@lfdecentralizedtrust/paladin-sdk 1.0.0-rc.1 → 1.0.0-rc.2
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.
- package/build/domains/zeto.js +1 -1
- package/build/interfaces/privacygroups.d.ts +1 -0
- package/build/interfaces/states.d.ts +4 -0
- package/build/interfaces/transaction.d.ts +9 -5
- package/build/interfaces/transaction.js +0 -4
- package/package.json +1 -1
- package/src/domains/zeto.ts +1 -1
- package/src/interfaces/privacygroups.ts +1 -0
- package/src/interfaces/states.ts +5 -0
- package/src/interfaces/transaction.ts +12 -6
package/build/domains/zeto.js
CHANGED
|
@@ -143,7 +143,7 @@ class ZetoInstance {
|
|
|
143
143
|
}
|
|
144
144
|
delegateLock(from, data) {
|
|
145
145
|
return new transaction_1.TransactionFuture(this.paladin, this.paladin.sendTransaction({
|
|
146
|
-
type: interfaces_1.TransactionType.
|
|
146
|
+
type: interfaces_1.TransactionType.PUBLIC,
|
|
147
147
|
abi: zetoPublicAbi,
|
|
148
148
|
function: "delegateLock",
|
|
149
149
|
to: this.address,
|
|
@@ -46,6 +46,7 @@ export interface IPrivacyGroupEVMTXInput extends IPrivacyGroupEVMTX {
|
|
|
46
46
|
export interface IPrivacyGroupEVMCall extends IPrivacyGroupEVMTX {
|
|
47
47
|
domain: string;
|
|
48
48
|
group: string;
|
|
49
|
+
block?: BigNumberish | string;
|
|
49
50
|
dataFormat?: string;
|
|
50
51
|
}
|
|
51
52
|
export interface IPrivacyGroupMessageListener {
|
|
@@ -25,6 +25,7 @@ export interface IStateEncoded {
|
|
|
25
25
|
}
|
|
26
26
|
export interface IState extends IStateBase {
|
|
27
27
|
confirmed?: IStateConfirm;
|
|
28
|
+
read?: IStateRead;
|
|
28
29
|
spent?: IStateSpend;
|
|
29
30
|
locks?: IStateLock[];
|
|
30
31
|
nullifier?: IStateNullifier;
|
|
@@ -44,6 +45,9 @@ export interface IStateInt64Label {
|
|
|
44
45
|
export interface IStateConfirm {
|
|
45
46
|
transaction: string;
|
|
46
47
|
}
|
|
48
|
+
export interface IStateRead {
|
|
49
|
+
transaction: string;
|
|
50
|
+
}
|
|
47
51
|
export interface IStateSpend {
|
|
48
52
|
transaction: string;
|
|
49
53
|
}
|
|
@@ -16,7 +16,11 @@ export interface PublicTxOptions {
|
|
|
16
16
|
maxPriorityFeePerGas?: BigNumberish;
|
|
17
17
|
maxFeePerGas?: BigNumberish;
|
|
18
18
|
}
|
|
19
|
+
export interface PublicCallOptions {
|
|
20
|
+
block?: BigNumberish | string;
|
|
21
|
+
}
|
|
19
22
|
export interface ITransactionBase {
|
|
23
|
+
idempotencyKey?: string;
|
|
20
24
|
type: TransactionType;
|
|
21
25
|
domain?: string;
|
|
22
26
|
function?: string;
|
|
@@ -26,10 +30,12 @@ export interface ITransactionBase {
|
|
|
26
30
|
[key: string]: any;
|
|
27
31
|
};
|
|
28
32
|
}
|
|
33
|
+
export type SubmitMode = "auto" | "external" | "call" | "prepare";
|
|
29
34
|
export interface ITransaction extends ITransactionBase {
|
|
30
35
|
id: string;
|
|
31
36
|
created: string;
|
|
32
37
|
abiReference: string;
|
|
38
|
+
submitMode?: SubmitMode;
|
|
33
39
|
}
|
|
34
40
|
export interface IPreparedTransaction {
|
|
35
41
|
id: string;
|
|
@@ -50,8 +56,10 @@ export interface ITransactionInput extends ITransactionBase {
|
|
|
50
56
|
abiReference?: string;
|
|
51
57
|
abi?: ethers.InterfaceAbi;
|
|
52
58
|
bytecode?: string;
|
|
59
|
+
dependsOn?: string[];
|
|
53
60
|
}
|
|
54
|
-
export interface ITransactionCall extends ITransactionInput {
|
|
61
|
+
export interface ITransactionCall extends ITransactionInput, PublicCallOptions {
|
|
62
|
+
dataFormat?: string;
|
|
55
63
|
}
|
|
56
64
|
export interface ITransactionReceipt {
|
|
57
65
|
blockNumber: number;
|
|
@@ -131,10 +139,6 @@ export interface ITransactionStates {
|
|
|
131
139
|
info?: string[];
|
|
132
140
|
};
|
|
133
141
|
}
|
|
134
|
-
export declare enum TransactionType {
|
|
135
|
-
Private = "private",
|
|
136
|
-
Public = "public"
|
|
137
|
-
}
|
|
138
142
|
export interface IABIDecodedData {
|
|
139
143
|
signature: string;
|
|
140
144
|
definition: ethers.JsonFragment;
|
|
@@ -6,7 +6,3 @@ var TransactionType;
|
|
|
6
6
|
TransactionType["PUBLIC"] = "public";
|
|
7
7
|
TransactionType["PRIVATE"] = "private";
|
|
8
8
|
})(TransactionType || (exports.TransactionType = TransactionType = {}));
|
|
9
|
-
(function (TransactionType) {
|
|
10
|
-
TransactionType["Private"] = "private";
|
|
11
|
-
TransactionType["Public"] = "public";
|
|
12
|
-
})(TransactionType || (exports.TransactionType = TransactionType = {}));
|
package/package.json
CHANGED
package/src/domains/zeto.ts
CHANGED
|
@@ -208,7 +208,7 @@ export class ZetoInstance {
|
|
|
208
208
|
return new TransactionFuture(
|
|
209
209
|
this.paladin,
|
|
210
210
|
this.paladin.sendTransaction({
|
|
211
|
-
type: TransactionType.
|
|
211
|
+
type: TransactionType.PUBLIC,
|
|
212
212
|
abi: zetoPublicAbi,
|
|
213
213
|
function: "delegateLock",
|
|
214
214
|
to: this.address,
|
package/src/interfaces/states.ts
CHANGED
|
@@ -29,6 +29,7 @@ export interface IStateEncoded {
|
|
|
29
29
|
|
|
30
30
|
export interface IState extends IStateBase {
|
|
31
31
|
confirmed?: IStateConfirm;
|
|
32
|
+
read?: IStateRead;
|
|
32
33
|
spent?: IStateSpend;
|
|
33
34
|
locks?: IStateLock[];
|
|
34
35
|
nullifier?: IStateNullifier;
|
|
@@ -52,6 +53,10 @@ export interface IStateConfirm {
|
|
|
52
53
|
transaction: string;
|
|
53
54
|
}
|
|
54
55
|
|
|
56
|
+
export interface IStateRead {
|
|
57
|
+
transaction: string;
|
|
58
|
+
}
|
|
59
|
+
|
|
55
60
|
export interface IStateSpend {
|
|
56
61
|
transaction: string;
|
|
57
62
|
}
|
|
@@ -20,7 +20,12 @@ export interface PublicTxOptions {
|
|
|
20
20
|
maxFeePerGas?: BigNumberish;
|
|
21
21
|
}
|
|
22
22
|
|
|
23
|
+
export interface PublicCallOptions {
|
|
24
|
+
block?: BigNumberish | string;
|
|
25
|
+
}
|
|
26
|
+
|
|
23
27
|
export interface ITransactionBase {
|
|
28
|
+
idempotencyKey?: string;
|
|
24
29
|
type: TransactionType;
|
|
25
30
|
domain?: string;
|
|
26
31
|
function?: string;
|
|
@@ -31,10 +36,13 @@ export interface ITransactionBase {
|
|
|
31
36
|
};
|
|
32
37
|
}
|
|
33
38
|
|
|
39
|
+
export type SubmitMode = "auto" | "external" | "call" | "prepare";
|
|
40
|
+
|
|
34
41
|
export interface ITransaction extends ITransactionBase {
|
|
35
42
|
id: string;
|
|
36
43
|
created: string;
|
|
37
44
|
abiReference: string;
|
|
45
|
+
submitMode?: SubmitMode;
|
|
38
46
|
}
|
|
39
47
|
|
|
40
48
|
export interface IPreparedTransaction {
|
|
@@ -57,9 +65,12 @@ export interface ITransactionInput extends ITransactionBase {
|
|
|
57
65
|
abiReference?: string;
|
|
58
66
|
abi?: ethers.InterfaceAbi;
|
|
59
67
|
bytecode?: string;
|
|
68
|
+
dependsOn?: string[];
|
|
60
69
|
}
|
|
61
70
|
|
|
62
|
-
export interface ITransactionCall extends ITransactionInput {
|
|
71
|
+
export interface ITransactionCall extends ITransactionInput, PublicCallOptions {
|
|
72
|
+
dataFormat?: string;
|
|
73
|
+
}
|
|
63
74
|
|
|
64
75
|
export interface ITransactionReceipt {
|
|
65
76
|
blockNumber: number;
|
|
@@ -148,11 +159,6 @@ export interface ITransactionStates {
|
|
|
148
159
|
};
|
|
149
160
|
}
|
|
150
161
|
|
|
151
|
-
export enum TransactionType {
|
|
152
|
-
Private = "private",
|
|
153
|
-
Public = "public",
|
|
154
|
-
}
|
|
155
|
-
|
|
156
162
|
export interface IABIDecodedData {
|
|
157
163
|
signature: string;
|
|
158
164
|
definition: ethers.JsonFragment;
|