-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
68b5d21
commit c0c76c9
Showing
4 changed files
with
205 additions
and
75 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,40 +1,40 @@ | ||
{ | ||
"name": "@effectai/sdk", | ||
"workspaces": ["docs", "src"], | ||
"scripts": { | ||
"test": "bun --env-file=.env test", | ||
"test:watch": "bun --env-file=.env test --watch", | ||
"test:only": "bun --env-file=.env test --watch --only", | ||
"test:coverage": "bun --env-file=.env test --coverage", | ||
"dev": "tsc -w --project src/tsconfig.build.json", | ||
"build": "bun run sdk:build && bun run docs:build", | ||
"lint": "biome lint --apply .", | ||
"format": "biome format --write .", | ||
"check": "biome check --apply .", | ||
"changeset": "changeset", | ||
"changeset:public": "bun scripts/updateVersion.ts && bun run build && changeset publish", | ||
"changeset:version": "changeset version && bun install --frozen-lockfile && bun scripts/updateVersion.ts", | ||
"changeset:publish": "bun run build && changeset publish", | ||
"docs:dev": "cd docs && bun run dev", | ||
"docs:build": "cd docs && bun run build", | ||
"docs:preview": "cd docs && bun run preview", | ||
"sdk:build": "tsc --project src/tsconfig.build.json --module es2020", | ||
"link": "cd src && bun link" | ||
}, | ||
"devDependencies": { | ||
"@biomejs/biome": "1.7.0", | ||
"@wharfkit/wallet-plugin-privatekey": "^1.0.0", | ||
"@changesets/changelog-github": "^0.4.5", | ||
"@changesets/cli": "^2.23.2", | ||
"@greymass/abi2core": "^2.0.1", | ||
"@size-limit/preset-big-lib": "^11.1.2", | ||
"@types/bun": "^1.1.1", | ||
"typescript": "5.4.2", | ||
"vite": "^5.0.7" | ||
}, | ||
"trustedDependencies": ["@biomejs/biome"], | ||
"dependencies": { | ||
"@wharfkit/transact-plugin-autocorrect": "^1.2.1", | ||
"gh-pages": "^6.1.1" | ||
} | ||
"name": "@effectai/sdk", | ||
"workspaces": ["docs", "src"], | ||
"scripts": { | ||
"test": "bun --env-file=.env test", | ||
"test:watch": "bun --env-file=.env test --watch", | ||
"test:only": "bun --env-file=.env test --watch --only", | ||
"test:coverage": "bun --env-file=.env test --coverage", | ||
"dev": "tsc -w --project src/tsconfig.build.json", | ||
"build": "bun run sdk:build && bun run docs:build", | ||
"lint": "biome lint --apply .", | ||
"format": "biome format --write .", | ||
"check": "biome check --apply .", | ||
"changeset": "changeset", | ||
"changeset:public": "bun scripts/updateVersion.ts && bun run build && changeset publish", | ||
"changeset:version": "changeset version && bun install --frozen-lockfile && bun scripts/updateVersion.ts", | ||
"changeset:publish": "bun run build && changeset publish", | ||
"docs:dev": "cd docs && bun run dev", | ||
"docs:build": "cd docs && bun run build", | ||
"docs:preview": "cd docs && bun run preview", | ||
"sdk:build": "tsc --project src/tsconfig.build.json --module es2020", | ||
"link": "cd src && bun link" | ||
}, | ||
"devDependencies": { | ||
"@biomejs/biome": "1.7.0", | ||
"@wharfkit/wallet-plugin-privatekey": "^1.0.0", | ||
"@changesets/changelog-github": "^0.4.5", | ||
"@changesets/cli": "^2.23.2", | ||
"@greymass/abi2core": "^2.0.1", | ||
"@size-limit/preset-big-lib": "^11.1.2", | ||
"@types/bun": "^1.1.1", | ||
"typescript": "5.4.2", | ||
"vite": "^5.0.7" | ||
}, | ||
"trustedDependencies": ["@biomejs/biome"], | ||
"dependencies": { | ||
"@wharfkit/transact-plugin-autocorrect": "^1.2.1", | ||
"gh-pages": "^6.1.1" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,141 @@ | ||
import type { BytesType, Checksum160, Checksum160Type, Int8, UInt64 } from "@wharfkit/antelope"; | ||
|
||
import type { | ||
BytesType, | ||
Checksum160, | ||
Checksum160Type, | ||
Int8, | ||
UInt64, | ||
} from "@wharfkit/antelope"; | ||
|
||
export type BVectorUint64E = UInt64[]; | ||
export type QUALIATOMICADDRESS = VariantNameUint32Uint64; | ||
export type Address = Checksum160; | ||
export type Content = TupleUint8String; | ||
export type Vaddress = VariantAddressName; | ||
|
||
export type VariantAddressName = [ string, string ]; | ||
export type VariantNameUint32Uint64 = [ string, number, number ]; | ||
export type VariantAddressName = [string, string]; | ||
export type VariantNameUint32Uint64 = [string, number, number]; | ||
|
||
export type Quali = { type: number; address: QUALIATOMICADDRESS; data_filter?: QualiDataFilter; }; | ||
export type QualiDataFilter = { attr_id: number; filter_type: number; data: string; }; | ||
export type Acctaskidx = { account_id: number; campaign_id: number; batch_idx: number; value: number; }; | ||
export type Batch = { id: number; campaign_id: number; content: Content; balance: {quantity: string, contract: string}; repetitions: number; num_tasks: number; start_task_idx: number; reward: {quantity: string, contract: string}; }; | ||
export type Campaign = { id: number; reservations_done: number; total_submissions: number; total_tasks: number; active_batch: number; num_batches: number; owner: Vaddress; paused: boolean; content: Content; max_task_time: number; reward: {quantity: string, contract: string}; qualis: Quali[]; }; | ||
export type Cleartasks = { batch_id: number; campaign_id: number; }; | ||
export type Editcampaign = { campaign_id: number; owner: Vaddress; content: Content; paused: boolean; reward: {quantity: string, contract: string}; qualis: Quali[]; payer: string; }; | ||
export type Init = { vaccount_contract: string; force_vaccount_id: number; payout_delay_sec: number; release_task_delay_sec: number; fee_contract: string; fee_percentage: number; }; | ||
export type Mkbatch = { id: number; campaign_id: number; content: Content; repetitions: number; payer: string; }; | ||
export type Mkcampaign = { owner: Vaddress; content: Content; max_task_time: number; reward: {quantity: string, contract: string}; qualis: Quali[]; payer: string; }; | ||
export type PairInt8Bytes = { first: Int8; second: string; }; | ||
export type Payment = { id: number; account_id: number; batch_id: number; pending: {quantity: string, contract: string}; last_submission_time: string; }; | ||
export type Payout = { payment_id: number; }; | ||
export type Publishbatch = { batch_id: number; num_tasks: number; }; | ||
export type Repsdone = { campaign_id: number; task_idx: number; value: number; }; | ||
export type Reservation = { id: number; task_idx: number; account_id?: number; batch_idx: number; reserved_on: string; campaign_id: number; }; | ||
export type Reservetask = { campaign_id: number; account_id: number; quali_assets?: BVectorUint64E; }; | ||
export type Rmbatch = { id: number; campaign_id: number; }; | ||
export type Rmcampaign = { campaign_id: number; owner: Vaddress; }; | ||
export type Settings = { vaccount_contract: string; force_vaccount_id: number; payout_delay_sec: number; release_task_delay_sec: number; fee_contract: string; fee_percentage: number; }; | ||
export type Submission = { id: number; campaign_id: number; task_idx: number; account_id?: number; batch_idx: number; data: PairInt8Bytes; paid: boolean; submitted_on: string; }; | ||
export type Submittask = { campaign_id: number; task_idx: number; data: PairInt8Bytes; account_id: number; }; | ||
export type TupleUint8String = { field_0: number; field_1: string; }; | ||
export type Quali = { | ||
type: number; | ||
address: QUALIATOMICADDRESS; | ||
data_filter?: QualiDataFilter; | ||
}; | ||
export type QualiDataFilter = { | ||
attr_id: number; | ||
filter_type: number; | ||
data: string; | ||
}; | ||
export type Acctaskidx = { | ||
account_id: number; | ||
campaign_id: number; | ||
batch_idx: number; | ||
value: number; | ||
}; | ||
export type Batch = { | ||
id: number; | ||
campaign_id: number; | ||
content: Content; | ||
balance: { quantity: string; contract: string }; | ||
repetitions: number; | ||
num_tasks: number; | ||
start_task_idx: number; | ||
reward: { quantity: string; contract: string }; | ||
}; | ||
export type Campaign = { | ||
id: number; | ||
reservations_done: number; | ||
total_submissions: number; | ||
total_tasks: number; | ||
active_batch: number; | ||
num_batches: number; | ||
owner: Vaddress; | ||
paused: boolean; | ||
content: Content; | ||
max_task_time: number; | ||
reward: { quantity: string; contract: string }; | ||
qualis: Quali[]; | ||
}; | ||
export type Cleartasks = { batch_id: number; campaign_id: number }; | ||
export type Editcampaign = { | ||
campaign_id: number; | ||
owner: Vaddress; | ||
content: Content; | ||
paused: boolean; | ||
reward: { quantity: string; contract: string }; | ||
qualis: Quali[]; | ||
payer: string; | ||
}; | ||
export type Init = { | ||
vaccount_contract: string; | ||
force_vaccount_id: number; | ||
payout_delay_sec: number; | ||
release_task_delay_sec: number; | ||
fee_contract: string; | ||
fee_percentage: number; | ||
}; | ||
export type Mkbatch = { | ||
id: number; | ||
campaign_id: number; | ||
content: Content; | ||
repetitions: number; | ||
payer: string; | ||
}; | ||
export type Mkcampaign = { | ||
owner: Vaddress; | ||
content: Content; | ||
max_task_time: number; | ||
reward: { quantity: string; contract: string }; | ||
qualis: Quali[]; | ||
payer: string; | ||
}; | ||
export type PairInt8Bytes = { first: Int8; second: string }; | ||
export type Payment = { | ||
id: number; | ||
account_id: number; | ||
batch_id: number; | ||
pending: { quantity: string; contract: string }; | ||
last_submission_time: string; | ||
}; | ||
export type Payout = { payment_id: number }; | ||
export type Publishbatch = { batch_id: number; num_tasks: number }; | ||
export type Repsdone = { campaign_id: number; task_idx: number; value: number }; | ||
export type Reservation = { | ||
id: number; | ||
task_idx: number; | ||
account_id?: number; | ||
batch_idx: number; | ||
reserved_on: string; | ||
campaign_id: number; | ||
}; | ||
export type Reservetask = { | ||
campaign_id: number; | ||
account_id: number; | ||
quali_assets?: BVectorUint64E; | ||
}; | ||
export type Rmbatch = { id: number; campaign_id: number }; | ||
export type Rmcampaign = { campaign_id: number; owner: Vaddress }; | ||
export type Settings = { | ||
vaccount_contract: string; | ||
force_vaccount_id: number; | ||
payout_delay_sec: number; | ||
release_task_delay_sec: number; | ||
fee_contract: string; | ||
fee_percentage: number; | ||
}; | ||
export type Submission = { | ||
id: number; | ||
campaign_id: number; | ||
task_idx: number; | ||
account_id?: number; | ||
batch_idx: number; | ||
data: PairInt8Bytes; | ||
paid: boolean; | ||
submitted_on: string; | ||
}; | ||
export type Submittask = { | ||
campaign_id: number; | ||
task_idx: number; | ||
data: PairInt8Bytes; | ||
account_id: number; | ||
}; | ||
export type TupleUint8String = { field_0: number; field_1: string }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,37 @@ | ||
import type { BytesType, Checksum160, Checksum160Type, Signature, UInt64 } from "@wharfkit/antelope"; | ||
|
||
import type { | ||
BytesType, | ||
Checksum160, | ||
Checksum160Type, | ||
Signature, | ||
UInt64, | ||
} from "@wharfkit/antelope"; | ||
|
||
export type Address = Checksum160; | ||
export type Vaddress = VariantAddressName; | ||
|
||
export type VariantAddressName = [ string, string ]; | ||
export type VariantAddressName = [string, string]; | ||
|
||
export type Account = { id: number; nonce: number; address: Vaddress; balance: {quantity: string, contract: string}; }; | ||
export type ExtendedSymbol = { sym: symbol; contract: string; }; | ||
export type Open = { acc: Vaddress; symbol: ExtendedSymbol; payer: string; }; | ||
export type Vtransfer = { from_id: number; to_id: number; quantity: {quantity: string, contract: string}; memo: string; sig?: Signature; fee?: {quantity: string, contract: string}; }; | ||
export type Withdraw = { from_id: number; to_account: string; quantity: {quantity: string, contract: string}; memo: string; sig?: Signature; fee?: {quantity: string, contract: string}; }; | ||
export type Account = { | ||
id: number; | ||
nonce: number; | ||
address: Vaddress; | ||
balance: { quantity: string; contract: string }; | ||
}; | ||
export type ExtendedSymbol = { sym: symbol; contract: string }; | ||
export type Open = { acc: Vaddress; symbol: ExtendedSymbol; payer: string }; | ||
export type Vtransfer = { | ||
from_id: number; | ||
to_id: number; | ||
quantity: { quantity: string; contract: string }; | ||
memo: string; | ||
sig?: Signature; | ||
fee?: { quantity: string; contract: string }; | ||
}; | ||
export type Withdraw = { | ||
from_id: number; | ||
to_account: string; | ||
quantity: { quantity: string; contract: string }; | ||
memo: string; | ||
sig?: Signature; | ||
fee?: { quantity: string; contract: string }; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters