@debridge-finance/intents-client 1.8.0-rc.0 → 1.8.0
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/dist/index.d.mts +133 -26
- package/dist/index.d.ts +133 -26
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +46 -46
package/dist/index.d.mts
CHANGED
|
@@ -8,10 +8,10 @@ import { PublicKey, Blockhash, AddressLookupTableAccount, TransactionInstruction
|
|
|
8
8
|
* IDL can be found at `target/idl/intents_program.json`.
|
|
9
9
|
*/
|
|
10
10
|
type IntentsProgram = {
|
|
11
|
-
address: "
|
|
11
|
+
address: "DeintXmrdZFgSKzEWcJWhK793HuqnfDydAPvHmayY5Xz";
|
|
12
12
|
metadata: {
|
|
13
13
|
name: "intentsProgram";
|
|
14
|
-
version: "0.0
|
|
14
|
+
version: "0.1.0";
|
|
15
15
|
spec: "0.1.0";
|
|
16
16
|
description: "deBridge Intents Program";
|
|
17
17
|
};
|
|
@@ -22,6 +22,44 @@ type IntentsProgram = {
|
|
|
22
22
|
accounts: [];
|
|
23
23
|
args: [];
|
|
24
24
|
},
|
|
25
|
+
{
|
|
26
|
+
name: "addTrustedSender";
|
|
27
|
+
discriminator: [98, 59, 65, 43, 42, 143, 142, 200];
|
|
28
|
+
accounts: [
|
|
29
|
+
{
|
|
30
|
+
name: "protocolAuthority";
|
|
31
|
+
writable: true;
|
|
32
|
+
signer: true;
|
|
33
|
+
relations: ["state"];
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
name: "state";
|
|
37
|
+
writable: true;
|
|
38
|
+
pda: {
|
|
39
|
+
seeds: [
|
|
40
|
+
{
|
|
41
|
+
kind: "const";
|
|
42
|
+
value: [115, 116, 97, 116, 101];
|
|
43
|
+
}
|
|
44
|
+
];
|
|
45
|
+
};
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
name: "trustedSender";
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
name: "payer";
|
|
52
|
+
writable: true;
|
|
53
|
+
signer: true;
|
|
54
|
+
optional: true;
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
name: "systemProgram";
|
|
58
|
+
address: "11111111111111111111111111111111";
|
|
59
|
+
}
|
|
60
|
+
];
|
|
61
|
+
args: [];
|
|
62
|
+
},
|
|
25
63
|
{
|
|
26
64
|
name: "approveProtocolTransfers";
|
|
27
65
|
discriminator: [17, 3, 184, 144, 112, 130, 116, 98];
|
|
@@ -104,26 +142,6 @@ type IntentsProgram = {
|
|
|
104
142
|
];
|
|
105
143
|
args: [];
|
|
106
144
|
},
|
|
107
|
-
{
|
|
108
|
-
name: "closeAccount";
|
|
109
|
-
discriminator: [125, 255, 149, 14, 110, 34, 72, 24];
|
|
110
|
-
accounts: [
|
|
111
|
-
{
|
|
112
|
-
name: "programAuthority";
|
|
113
|
-
signer: true;
|
|
114
|
-
address: "intV2u5xDE8T2ZMFP3W3X6sVqGHBT7zvYtTW3rRLmvE";
|
|
115
|
-
},
|
|
116
|
-
{
|
|
117
|
-
name: "target";
|
|
118
|
-
writable: true;
|
|
119
|
-
},
|
|
120
|
-
{
|
|
121
|
-
name: "rentReceiver";
|
|
122
|
-
writable: true;
|
|
123
|
-
}
|
|
124
|
-
];
|
|
125
|
-
args: [];
|
|
126
|
-
},
|
|
127
145
|
{
|
|
128
146
|
name: "closeIntent";
|
|
129
147
|
discriminator: [112, 245, 154, 249, 57, 126, 54, 122];
|
|
@@ -360,7 +378,7 @@ type IntentsProgram = {
|
|
|
360
378
|
},
|
|
361
379
|
{
|
|
362
380
|
name: "dlnSrc";
|
|
363
|
-
address: "
|
|
381
|
+
address: "src5qyZHqTqecJV4aY6Cb6zDZLMDzrDKKezs22MPHr4";
|
|
364
382
|
},
|
|
365
383
|
{
|
|
366
384
|
name: "dlnSrcState";
|
|
@@ -1064,7 +1082,7 @@ type IntentsProgram = {
|
|
|
1064
1082
|
{
|
|
1065
1083
|
name: "programAuthority";
|
|
1066
1084
|
signer: true;
|
|
1067
|
-
address: "
|
|
1085
|
+
address: "DeintXmrdZFgSKzEWcJWhK793HuqnfDydAPvHmayY5Xz";
|
|
1068
1086
|
},
|
|
1069
1087
|
{
|
|
1070
1088
|
name: "rentPayer";
|
|
@@ -1133,6 +1151,70 @@ type IntentsProgram = {
|
|
|
1133
1151
|
}
|
|
1134
1152
|
];
|
|
1135
1153
|
},
|
|
1154
|
+
{
|
|
1155
|
+
name: "removeTrustedSender";
|
|
1156
|
+
discriminator: [95, 255, 228, 80, 113, 240, 173, 55];
|
|
1157
|
+
accounts: [
|
|
1158
|
+
{
|
|
1159
|
+
name: "inner";
|
|
1160
|
+
accounts: [
|
|
1161
|
+
{
|
|
1162
|
+
name: "protocolAuthority";
|
|
1163
|
+
signer: true;
|
|
1164
|
+
relations: ["state"];
|
|
1165
|
+
},
|
|
1166
|
+
{
|
|
1167
|
+
name: "state";
|
|
1168
|
+
writable: true;
|
|
1169
|
+
pda: {
|
|
1170
|
+
seeds: [
|
|
1171
|
+
{
|
|
1172
|
+
kind: "const";
|
|
1173
|
+
value: [115, 116, 97, 116, 101];
|
|
1174
|
+
}
|
|
1175
|
+
];
|
|
1176
|
+
};
|
|
1177
|
+
}
|
|
1178
|
+
];
|
|
1179
|
+
},
|
|
1180
|
+
{
|
|
1181
|
+
name: "trustedSender";
|
|
1182
|
+
}
|
|
1183
|
+
];
|
|
1184
|
+
args: [];
|
|
1185
|
+
},
|
|
1186
|
+
{
|
|
1187
|
+
name: "setCancelAuthority";
|
|
1188
|
+
discriminator: [21, 43, 104, 169, 110, 210, 47, 107];
|
|
1189
|
+
accounts: [
|
|
1190
|
+
{
|
|
1191
|
+
name: "inner";
|
|
1192
|
+
accounts: [
|
|
1193
|
+
{
|
|
1194
|
+
name: "protocolAuthority";
|
|
1195
|
+
signer: true;
|
|
1196
|
+
relations: ["state"];
|
|
1197
|
+
},
|
|
1198
|
+
{
|
|
1199
|
+
name: "state";
|
|
1200
|
+
writable: true;
|
|
1201
|
+
pda: {
|
|
1202
|
+
seeds: [
|
|
1203
|
+
{
|
|
1204
|
+
kind: "const";
|
|
1205
|
+
value: [115, 116, 97, 116, 101];
|
|
1206
|
+
}
|
|
1207
|
+
];
|
|
1208
|
+
};
|
|
1209
|
+
}
|
|
1210
|
+
];
|
|
1211
|
+
},
|
|
1212
|
+
{
|
|
1213
|
+
name: "cancelAuthority";
|
|
1214
|
+
}
|
|
1215
|
+
];
|
|
1216
|
+
args: [];
|
|
1217
|
+
},
|
|
1136
1218
|
{
|
|
1137
1219
|
name: "setCancelUntilTimestamp";
|
|
1138
1220
|
discriminator: [206, 248, 194, 176, 4, 206, 30, 228];
|
|
@@ -3283,6 +3365,22 @@ type IntentsProgram = {
|
|
|
3283
3365
|
{
|
|
3284
3366
|
name: "bump";
|
|
3285
3367
|
type: "u8";
|
|
3368
|
+
},
|
|
3369
|
+
{
|
|
3370
|
+
name: "cancelAuthority";
|
|
3371
|
+
type: "pubkey";
|
|
3372
|
+
},
|
|
3373
|
+
{
|
|
3374
|
+
name: "reserved";
|
|
3375
|
+
type: {
|
|
3376
|
+
array: ["u8", 160];
|
|
3377
|
+
};
|
|
3378
|
+
},
|
|
3379
|
+
{
|
|
3380
|
+
name: "trustedSenders";
|
|
3381
|
+
type: {
|
|
3382
|
+
vec: "pubkey";
|
|
3383
|
+
};
|
|
3286
3384
|
}
|
|
3287
3385
|
];
|
|
3288
3386
|
};
|
|
@@ -3428,7 +3526,7 @@ type IntentsProgram = {
|
|
|
3428
3526
|
{
|
|
3429
3527
|
name: "intentsProgramSigPrefix";
|
|
3430
3528
|
type: "bytes";
|
|
3431
|
-
value: "[105, 110, 116, 101, 110, 116, 115, 95, 112, 114, 111, 103, 114, 97, 109
|
|
3529
|
+
value: "[105, 110, 116, 101, 110, 116, 115, 95, 112, 114, 111, 103, 114, 97, 109]";
|
|
3432
3530
|
},
|
|
3433
3531
|
{
|
|
3434
3532
|
name: "intentIdHashPrefix";
|
|
@@ -3463,6 +3561,11 @@ type IntentsProgram = {
|
|
|
3463
3561
|
type: "bytes";
|
|
3464
3562
|
value: "[115, 116, 97, 116, 101]";
|
|
3465
3563
|
},
|
|
3564
|
+
{
|
|
3565
|
+
name: "trustedSenderPlaceholder";
|
|
3566
|
+
type: "pubkey";
|
|
3567
|
+
value: "UseDeBridgeTrustedSender1111111111111111111";
|
|
3568
|
+
},
|
|
3466
3569
|
{
|
|
3467
3570
|
name: "unwrapNativePseudoMint";
|
|
3468
3571
|
type: "pubkey";
|
|
@@ -3536,8 +3639,11 @@ interface IntentType {
|
|
|
3536
3639
|
externalCallHash?: Buffer | Any;
|
|
3537
3640
|
dlnMetadata?: Buffer | Any;
|
|
3538
3641
|
}
|
|
3539
|
-
type State = Omit<IdlAccounts<IntentsProgram>["state"], "
|
|
3642
|
+
type State = Omit<IdlAccounts<IntentsProgram>["state"], "cancelUntilTimestamp" | "cancelAuthority" | "reserved"> & {
|
|
3643
|
+
cancelUntilTimestamp: number;
|
|
3540
3644
|
lastValidTimestamp: number;
|
|
3645
|
+
cancelAuthority?: IdlAccounts<IntentsProgram>["state"]["cancelAuthority"];
|
|
3646
|
+
reserved?: IdlAccounts<IntentsProgram>["state"]["reserved"];
|
|
3541
3647
|
};
|
|
3542
3648
|
type IntentStorage = IdlAccounts<IntentsProgram>["intentStorage"] & {
|
|
3543
3649
|
intentId: Buffer;
|
|
@@ -3882,6 +3988,7 @@ declare class IntentsClient {
|
|
|
3882
3988
|
static getBufferForIntentSignature(intentId: Buffer, intentProgramSigPrefix?: IntentProgramSigPrefix, chainId?: number): Buffer;
|
|
3883
3989
|
static getDelegateApprovedBudgetsArgs(tokens: DelegateApprovedBudgetsArgs): any;
|
|
3884
3990
|
static getBufferForBudgetSignature(delegate: PublicKey, nonce: bigint, tokens: DelegateApprovedBudgetsArgs, intentProgramSigPrefix?: IntentProgramSigPrefix, chainId?: number): Buffer;
|
|
3991
|
+
private static decodeLegacyState;
|
|
3885
3992
|
}
|
|
3886
3993
|
|
|
3887
3994
|
declare class Intent implements Serializable {
|
package/dist/index.d.ts
CHANGED
|
@@ -8,10 +8,10 @@ import { PublicKey, Blockhash, AddressLookupTableAccount, TransactionInstruction
|
|
|
8
8
|
* IDL can be found at `target/idl/intents_program.json`.
|
|
9
9
|
*/
|
|
10
10
|
type IntentsProgram = {
|
|
11
|
-
address: "
|
|
11
|
+
address: "DeintXmrdZFgSKzEWcJWhK793HuqnfDydAPvHmayY5Xz";
|
|
12
12
|
metadata: {
|
|
13
13
|
name: "intentsProgram";
|
|
14
|
-
version: "0.0
|
|
14
|
+
version: "0.1.0";
|
|
15
15
|
spec: "0.1.0";
|
|
16
16
|
description: "deBridge Intents Program";
|
|
17
17
|
};
|
|
@@ -22,6 +22,44 @@ type IntentsProgram = {
|
|
|
22
22
|
accounts: [];
|
|
23
23
|
args: [];
|
|
24
24
|
},
|
|
25
|
+
{
|
|
26
|
+
name: "addTrustedSender";
|
|
27
|
+
discriminator: [98, 59, 65, 43, 42, 143, 142, 200];
|
|
28
|
+
accounts: [
|
|
29
|
+
{
|
|
30
|
+
name: "protocolAuthority";
|
|
31
|
+
writable: true;
|
|
32
|
+
signer: true;
|
|
33
|
+
relations: ["state"];
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
name: "state";
|
|
37
|
+
writable: true;
|
|
38
|
+
pda: {
|
|
39
|
+
seeds: [
|
|
40
|
+
{
|
|
41
|
+
kind: "const";
|
|
42
|
+
value: [115, 116, 97, 116, 101];
|
|
43
|
+
}
|
|
44
|
+
];
|
|
45
|
+
};
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
name: "trustedSender";
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
name: "payer";
|
|
52
|
+
writable: true;
|
|
53
|
+
signer: true;
|
|
54
|
+
optional: true;
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
name: "systemProgram";
|
|
58
|
+
address: "11111111111111111111111111111111";
|
|
59
|
+
}
|
|
60
|
+
];
|
|
61
|
+
args: [];
|
|
62
|
+
},
|
|
25
63
|
{
|
|
26
64
|
name: "approveProtocolTransfers";
|
|
27
65
|
discriminator: [17, 3, 184, 144, 112, 130, 116, 98];
|
|
@@ -104,26 +142,6 @@ type IntentsProgram = {
|
|
|
104
142
|
];
|
|
105
143
|
args: [];
|
|
106
144
|
},
|
|
107
|
-
{
|
|
108
|
-
name: "closeAccount";
|
|
109
|
-
discriminator: [125, 255, 149, 14, 110, 34, 72, 24];
|
|
110
|
-
accounts: [
|
|
111
|
-
{
|
|
112
|
-
name: "programAuthority";
|
|
113
|
-
signer: true;
|
|
114
|
-
address: "intV2u5xDE8T2ZMFP3W3X6sVqGHBT7zvYtTW3rRLmvE";
|
|
115
|
-
},
|
|
116
|
-
{
|
|
117
|
-
name: "target";
|
|
118
|
-
writable: true;
|
|
119
|
-
},
|
|
120
|
-
{
|
|
121
|
-
name: "rentReceiver";
|
|
122
|
-
writable: true;
|
|
123
|
-
}
|
|
124
|
-
];
|
|
125
|
-
args: [];
|
|
126
|
-
},
|
|
127
145
|
{
|
|
128
146
|
name: "closeIntent";
|
|
129
147
|
discriminator: [112, 245, 154, 249, 57, 126, 54, 122];
|
|
@@ -360,7 +378,7 @@ type IntentsProgram = {
|
|
|
360
378
|
},
|
|
361
379
|
{
|
|
362
380
|
name: "dlnSrc";
|
|
363
|
-
address: "
|
|
381
|
+
address: "src5qyZHqTqecJV4aY6Cb6zDZLMDzrDKKezs22MPHr4";
|
|
364
382
|
},
|
|
365
383
|
{
|
|
366
384
|
name: "dlnSrcState";
|
|
@@ -1064,7 +1082,7 @@ type IntentsProgram = {
|
|
|
1064
1082
|
{
|
|
1065
1083
|
name: "programAuthority";
|
|
1066
1084
|
signer: true;
|
|
1067
|
-
address: "
|
|
1085
|
+
address: "DeintXmrdZFgSKzEWcJWhK793HuqnfDydAPvHmayY5Xz";
|
|
1068
1086
|
},
|
|
1069
1087
|
{
|
|
1070
1088
|
name: "rentPayer";
|
|
@@ -1133,6 +1151,70 @@ type IntentsProgram = {
|
|
|
1133
1151
|
}
|
|
1134
1152
|
];
|
|
1135
1153
|
},
|
|
1154
|
+
{
|
|
1155
|
+
name: "removeTrustedSender";
|
|
1156
|
+
discriminator: [95, 255, 228, 80, 113, 240, 173, 55];
|
|
1157
|
+
accounts: [
|
|
1158
|
+
{
|
|
1159
|
+
name: "inner";
|
|
1160
|
+
accounts: [
|
|
1161
|
+
{
|
|
1162
|
+
name: "protocolAuthority";
|
|
1163
|
+
signer: true;
|
|
1164
|
+
relations: ["state"];
|
|
1165
|
+
},
|
|
1166
|
+
{
|
|
1167
|
+
name: "state";
|
|
1168
|
+
writable: true;
|
|
1169
|
+
pda: {
|
|
1170
|
+
seeds: [
|
|
1171
|
+
{
|
|
1172
|
+
kind: "const";
|
|
1173
|
+
value: [115, 116, 97, 116, 101];
|
|
1174
|
+
}
|
|
1175
|
+
];
|
|
1176
|
+
};
|
|
1177
|
+
}
|
|
1178
|
+
];
|
|
1179
|
+
},
|
|
1180
|
+
{
|
|
1181
|
+
name: "trustedSender";
|
|
1182
|
+
}
|
|
1183
|
+
];
|
|
1184
|
+
args: [];
|
|
1185
|
+
},
|
|
1186
|
+
{
|
|
1187
|
+
name: "setCancelAuthority";
|
|
1188
|
+
discriminator: [21, 43, 104, 169, 110, 210, 47, 107];
|
|
1189
|
+
accounts: [
|
|
1190
|
+
{
|
|
1191
|
+
name: "inner";
|
|
1192
|
+
accounts: [
|
|
1193
|
+
{
|
|
1194
|
+
name: "protocolAuthority";
|
|
1195
|
+
signer: true;
|
|
1196
|
+
relations: ["state"];
|
|
1197
|
+
},
|
|
1198
|
+
{
|
|
1199
|
+
name: "state";
|
|
1200
|
+
writable: true;
|
|
1201
|
+
pda: {
|
|
1202
|
+
seeds: [
|
|
1203
|
+
{
|
|
1204
|
+
kind: "const";
|
|
1205
|
+
value: [115, 116, 97, 116, 101];
|
|
1206
|
+
}
|
|
1207
|
+
];
|
|
1208
|
+
};
|
|
1209
|
+
}
|
|
1210
|
+
];
|
|
1211
|
+
},
|
|
1212
|
+
{
|
|
1213
|
+
name: "cancelAuthority";
|
|
1214
|
+
}
|
|
1215
|
+
];
|
|
1216
|
+
args: [];
|
|
1217
|
+
},
|
|
1136
1218
|
{
|
|
1137
1219
|
name: "setCancelUntilTimestamp";
|
|
1138
1220
|
discriminator: [206, 248, 194, 176, 4, 206, 30, 228];
|
|
@@ -3283,6 +3365,22 @@ type IntentsProgram = {
|
|
|
3283
3365
|
{
|
|
3284
3366
|
name: "bump";
|
|
3285
3367
|
type: "u8";
|
|
3368
|
+
},
|
|
3369
|
+
{
|
|
3370
|
+
name: "cancelAuthority";
|
|
3371
|
+
type: "pubkey";
|
|
3372
|
+
},
|
|
3373
|
+
{
|
|
3374
|
+
name: "reserved";
|
|
3375
|
+
type: {
|
|
3376
|
+
array: ["u8", 160];
|
|
3377
|
+
};
|
|
3378
|
+
},
|
|
3379
|
+
{
|
|
3380
|
+
name: "trustedSenders";
|
|
3381
|
+
type: {
|
|
3382
|
+
vec: "pubkey";
|
|
3383
|
+
};
|
|
3286
3384
|
}
|
|
3287
3385
|
];
|
|
3288
3386
|
};
|
|
@@ -3428,7 +3526,7 @@ type IntentsProgram = {
|
|
|
3428
3526
|
{
|
|
3429
3527
|
name: "intentsProgramSigPrefix";
|
|
3430
3528
|
type: "bytes";
|
|
3431
|
-
value: "[105, 110, 116, 101, 110, 116, 115, 95, 112, 114, 111, 103, 114, 97, 109
|
|
3529
|
+
value: "[105, 110, 116, 101, 110, 116, 115, 95, 112, 114, 111, 103, 114, 97, 109]";
|
|
3432
3530
|
},
|
|
3433
3531
|
{
|
|
3434
3532
|
name: "intentIdHashPrefix";
|
|
@@ -3463,6 +3561,11 @@ type IntentsProgram = {
|
|
|
3463
3561
|
type: "bytes";
|
|
3464
3562
|
value: "[115, 116, 97, 116, 101]";
|
|
3465
3563
|
},
|
|
3564
|
+
{
|
|
3565
|
+
name: "trustedSenderPlaceholder";
|
|
3566
|
+
type: "pubkey";
|
|
3567
|
+
value: "UseDeBridgeTrustedSender1111111111111111111";
|
|
3568
|
+
},
|
|
3466
3569
|
{
|
|
3467
3570
|
name: "unwrapNativePseudoMint";
|
|
3468
3571
|
type: "pubkey";
|
|
@@ -3536,8 +3639,11 @@ interface IntentType {
|
|
|
3536
3639
|
externalCallHash?: Buffer | Any;
|
|
3537
3640
|
dlnMetadata?: Buffer | Any;
|
|
3538
3641
|
}
|
|
3539
|
-
type State = Omit<IdlAccounts<IntentsProgram>["state"], "
|
|
3642
|
+
type State = Omit<IdlAccounts<IntentsProgram>["state"], "cancelUntilTimestamp" | "cancelAuthority" | "reserved"> & {
|
|
3643
|
+
cancelUntilTimestamp: number;
|
|
3540
3644
|
lastValidTimestamp: number;
|
|
3645
|
+
cancelAuthority?: IdlAccounts<IntentsProgram>["state"]["cancelAuthority"];
|
|
3646
|
+
reserved?: IdlAccounts<IntentsProgram>["state"]["reserved"];
|
|
3541
3647
|
};
|
|
3542
3648
|
type IntentStorage = IdlAccounts<IntentsProgram>["intentStorage"] & {
|
|
3543
3649
|
intentId: Buffer;
|
|
@@ -3882,6 +3988,7 @@ declare class IntentsClient {
|
|
|
3882
3988
|
static getBufferForIntentSignature(intentId: Buffer, intentProgramSigPrefix?: IntentProgramSigPrefix, chainId?: number): Buffer;
|
|
3883
3989
|
static getDelegateApprovedBudgetsArgs(tokens: DelegateApprovedBudgetsArgs): any;
|
|
3884
3990
|
static getBufferForBudgetSignature(delegate: PublicKey, nonce: bigint, tokens: DelegateApprovedBudgetsArgs, intentProgramSigPrefix?: IntentProgramSigPrefix, chainId?: number): Buffer;
|
|
3991
|
+
private static decodeLegacyState;
|
|
3885
3992
|
}
|
|
3886
3993
|
|
|
3887
3994
|
declare class Intent implements Serializable {
|