@xelis/sdk 0.11.12 → 0.11.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -183,18 +183,28 @@ export interface ContractDeposit {
|
|
|
183
183
|
export interface InvokeContractPayload {
|
|
184
184
|
contract: string;
|
|
185
185
|
deposits: {
|
|
186
|
-
[
|
|
186
|
+
[hash: string]: ContractDeposit;
|
|
187
187
|
};
|
|
188
188
|
chunk_id: number;
|
|
189
189
|
max_gas: number;
|
|
190
190
|
parameters: number[][];
|
|
191
191
|
}
|
|
192
|
+
export interface InvokeConstructorPayload {
|
|
193
|
+
max_gas: number;
|
|
194
|
+
deposits: {
|
|
195
|
+
[hash: string]: ContractDeposit;
|
|
196
|
+
};
|
|
197
|
+
}
|
|
198
|
+
export interface DeployContractPayload {
|
|
199
|
+
module: Module;
|
|
200
|
+
invoke: InvokeConstructorPayload | null;
|
|
201
|
+
}
|
|
192
202
|
export interface TransactionData {
|
|
193
203
|
transfers: Transfer[] | null;
|
|
194
204
|
burn: Burn | null;
|
|
195
205
|
multi_sig: MultiSigPayload | null;
|
|
196
206
|
invoke_contract: InvokeContractPayload | null;
|
|
197
|
-
deploy_contract:
|
|
207
|
+
deploy_contract: DeployContractPayload | null;
|
|
198
208
|
}
|
|
199
209
|
export interface SourceCommitment {
|
|
200
210
|
commitment: number[];
|
|
@@ -472,12 +482,15 @@ export interface GetContractBalanceAtTopoheightParams {
|
|
|
472
482
|
export interface Chunk {
|
|
473
483
|
instructions: number[];
|
|
474
484
|
}
|
|
485
|
+
export type Access = "all" | "internal" | {
|
|
486
|
+
"hook": {
|
|
487
|
+
id: number;
|
|
488
|
+
};
|
|
489
|
+
} | "entry";
|
|
475
490
|
export interface Module {
|
|
476
|
-
|
|
477
|
-
|
|
491
|
+
chunks: (Chunk | Access)[];
|
|
492
|
+
constants: any[];
|
|
478
493
|
entry_chunk_ids: number[];
|
|
479
|
-
structs: any[];
|
|
480
|
-
enums: any[];
|
|
481
494
|
}
|
|
482
495
|
export interface GetContractModuleResult {
|
|
483
496
|
previous_topoheight: number | null;
|
|
@@ -511,9 +524,9 @@ export interface ContractOutputRefundDeposits {
|
|
|
511
524
|
}
|
|
512
525
|
export type ContractOutput = ContractOutputRefundGas | ContractOutputTransfer | ContractOutputExitCode | ContractOutputRefundDeposits;
|
|
513
526
|
export interface TransactionResponse extends Transaction {
|
|
514
|
-
blocks: string[];
|
|
515
|
-
executed_in_block: string;
|
|
516
527
|
in_mempool: boolean;
|
|
528
|
+
blocks?: string[];
|
|
529
|
+
executed_in_block?: string;
|
|
517
530
|
first_seen?: number;
|
|
518
531
|
}
|
|
519
532
|
export interface GetMempoolParams {
|
|
@@ -14,6 +14,16 @@ export interface ContractDepositBuilder {
|
|
|
14
14
|
amount: number;
|
|
15
15
|
private: boolean;
|
|
16
16
|
}
|
|
17
|
+
export interface DeployContractInvokeBuilder {
|
|
18
|
+
max_gas: number;
|
|
19
|
+
deposits: {
|
|
20
|
+
[key: string]: ContractDepositBuilder;
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
export interface DeployContractBuilder {
|
|
24
|
+
module: string;
|
|
25
|
+
invoke?: DeployContractInvokeBuilder;
|
|
26
|
+
}
|
|
17
27
|
export interface InvokeContractBuilder {
|
|
18
28
|
contract: string;
|
|
19
29
|
max_gas: number;
|
|
@@ -38,7 +48,7 @@ export interface BuildTransactionParams {
|
|
|
38
48
|
burn?: daemonTypes.Burn;
|
|
39
49
|
multi_sig?: MultiSigBuilder;
|
|
40
50
|
invoke_contract?: InvokeContractBuilder;
|
|
41
|
-
deploy_contract?:
|
|
51
|
+
deploy_contract?: DeployContractBuilder;
|
|
42
52
|
fee?: FeeBuilder;
|
|
43
53
|
nonce?: number;
|
|
44
54
|
tx_version?: number;
|
package/package.json
CHANGED