@ic-pay/icpay-sdk 1.3.93 → 1.3.96
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.
|
@@ -16,6 +16,10 @@ export interface AccountRecord {
|
|
|
16
16
|
'account_canister_id' : bigint,
|
|
17
17
|
'account' : Account,
|
|
18
18
|
}
|
|
19
|
+
export interface AllowedLedgerInfo {
|
|
20
|
+
'canister_id' : string,
|
|
21
|
+
'standard' : LedgerStandard,
|
|
22
|
+
}
|
|
19
23
|
export interface CanisterMetrics {
|
|
20
24
|
'total_accounts' : number,
|
|
21
25
|
'cycles_balance' : bigint,
|
|
@@ -65,6 +69,9 @@ export type Icrc21Error = {
|
|
|
65
69
|
{ 'ConsentMessageUnavailable' : Icrc21ErrorInfo };
|
|
66
70
|
export interface Icrc21ErrorInfo { 'description' : string }
|
|
67
71
|
export interface Icrc21Page { 'lines' : Array<string> }
|
|
72
|
+
export type LedgerStandard = { 'Ck' : null } |
|
|
73
|
+
{ 'Icp' : null } |
|
|
74
|
+
{ 'Icrc' : null };
|
|
68
75
|
export interface LedgerTransactionNotification {
|
|
69
76
|
'block_index' : bigint,
|
|
70
77
|
'ledger_canister_id' : string,
|
|
@@ -169,6 +176,7 @@ export type TransactionStatus = { 'Failed' : string } |
|
|
|
169
176
|
{ 'Pending' : null };
|
|
170
177
|
export interface _SERVICE {
|
|
171
178
|
'add_account' : ActorMethod<[bigint, Account], Result>,
|
|
179
|
+
'add_allowed_ledger' : ActorMethod<[string, LedgerStandard], Result>,
|
|
172
180
|
'get_account' : ActorMethod<[bigint], [] | [Account]>,
|
|
173
181
|
'get_account_transactions' : ActorMethod<
|
|
174
182
|
[bigint, [] | [number], [] | [number]],
|
|
@@ -190,6 +198,7 @@ export interface _SERVICE {
|
|
|
190
198
|
>,
|
|
191
199
|
'initialize_controllers' : ActorMethod<[], Result>,
|
|
192
200
|
'list_accounts' : ActorMethod<[], Array<AccountRecord>>,
|
|
201
|
+
'list_allowed_ledgers' : ActorMethod<[], Array<AllowedLedgerInfo>>,
|
|
193
202
|
'notify_ledger_transaction' : ActorMethod<
|
|
194
203
|
[LedgerTransactionNotification],
|
|
195
204
|
Result_1
|
|
@@ -199,6 +208,7 @@ export interface _SERVICE {
|
|
|
199
208
|
Result_1
|
|
200
209
|
>,
|
|
201
210
|
'remove_account' : ActorMethod<[bigint], Result>,
|
|
211
|
+
'remove_allowed_ledger' : ActorMethod<[string], Result>,
|
|
202
212
|
'request_payout' : ActorMethod<[bigint, bigint, string, bigint], Result_2>,
|
|
203
213
|
'request_refund' : ActorMethod<[bigint], Result_3>,
|
|
204
214
|
'set_platform_wallet' : ActorMethod<[string], Result>,
|
|
@@ -14,6 +14,11 @@ export const idlFactory = ({ IDL }) => {
|
|
|
14
14
|
'splits' : IDL.Vec(SplitRule),
|
|
15
15
|
});
|
|
16
16
|
const Result = IDL.Variant({ 'Ok' : IDL.Null, 'Err' : IDL.Text });
|
|
17
|
+
const LedgerStandard = IDL.Variant({
|
|
18
|
+
'Ck' : IDL.Null,
|
|
19
|
+
'Icp' : IDL.Null,
|
|
20
|
+
'Icrc' : IDL.Null,
|
|
21
|
+
});
|
|
17
22
|
const TransactionStatus = IDL.Variant({
|
|
18
23
|
'Failed' : IDL.Text,
|
|
19
24
|
'Processed' : IDL.Null,
|
|
@@ -155,6 +160,10 @@ export const idlFactory = ({ IDL }) => {
|
|
|
155
160
|
'account_canister_id' : IDL.Nat64,
|
|
156
161
|
'account' : Account,
|
|
157
162
|
});
|
|
163
|
+
const AllowedLedgerInfo = IDL.Record({
|
|
164
|
+
'canister_id' : IDL.Text,
|
|
165
|
+
'standard' : LedgerStandard,
|
|
166
|
+
});
|
|
158
167
|
const LedgerTransactionNotification = IDL.Record({
|
|
159
168
|
'block_index' : IDL.Nat64,
|
|
160
169
|
'ledger_canister_id' : IDL.Text,
|
|
@@ -169,6 +178,7 @@ export const idlFactory = ({ IDL }) => {
|
|
|
169
178
|
const Result_3 = IDL.Variant({ 'Ok' : IDL.Nat, 'Err' : IDL.Text });
|
|
170
179
|
return IDL.Service({
|
|
171
180
|
'add_account' : IDL.Func([IDL.Nat64, Account], [Result], []),
|
|
181
|
+
'add_allowed_ledger' : IDL.Func([IDL.Text, LedgerStandard], [Result], []),
|
|
172
182
|
'get_account' : IDL.Func([IDL.Nat64], [IDL.Opt(Account)], ['query']),
|
|
173
183
|
'get_account_transactions' : IDL.Func(
|
|
174
184
|
[IDL.Nat64, IDL.Opt(IDL.Nat32), IDL.Opt(IDL.Nat32)],
|
|
@@ -201,6 +211,11 @@ export const idlFactory = ({ IDL }) => {
|
|
|
201
211
|
),
|
|
202
212
|
'initialize_controllers' : IDL.Func([], [Result], []),
|
|
203
213
|
'list_accounts' : IDL.Func([], [IDL.Vec(AccountRecord)], ['query']),
|
|
214
|
+
'list_allowed_ledgers' : IDL.Func(
|
|
215
|
+
[],
|
|
216
|
+
[IDL.Vec(AllowedLedgerInfo)],
|
|
217
|
+
['query'],
|
|
218
|
+
),
|
|
204
219
|
'notify_ledger_transaction' : IDL.Func(
|
|
205
220
|
[LedgerTransactionNotification],
|
|
206
221
|
[Result_1],
|
|
@@ -212,6 +227,7 @@ export const idlFactory = ({ IDL }) => {
|
|
|
212
227
|
[],
|
|
213
228
|
),
|
|
214
229
|
'remove_account' : IDL.Func([IDL.Nat64], [Result], []),
|
|
230
|
+
'remove_allowed_ledger' : IDL.Func([IDL.Text], [Result], []),
|
|
215
231
|
'request_payout' : IDL.Func(
|
|
216
232
|
[IDL.Nat, IDL.Nat64, IDL.Text, IDL.Nat],
|
|
217
233
|
[Result_2],
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ic-pay/icpay-sdk",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.96",
|
|
4
4
|
"description": "Official icpay SDK for Internet Computer payments",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -25,21 +25,18 @@
|
|
|
25
25
|
"author": "icpay",
|
|
26
26
|
"license": "MIT",
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@dfinity/agent": "^
|
|
29
|
-
"@dfinity/auth-client": "^
|
|
30
|
-
"@dfinity/candid": "^
|
|
31
|
-
"@dfinity/
|
|
32
|
-
"@dfinity/ledger-icp": "^3.0.0",
|
|
33
|
-
"@dfinity/principal": "^2.4.1"
|
|
28
|
+
"@dfinity/agent": "^3.4.1",
|
|
29
|
+
"@dfinity/auth-client": "^3.4.1",
|
|
30
|
+
"@dfinity/candid": "^3.4.1",
|
|
31
|
+
"@dfinity/principal": "^3.4.1"
|
|
34
32
|
},
|
|
35
33
|
"devDependencies": {
|
|
36
|
-
"@types/node": "^
|
|
37
|
-
"@typescript-eslint/eslint-plugin": "^
|
|
38
|
-
"@typescript-eslint/parser": "^
|
|
39
|
-
"eslint": "^
|
|
40
|
-
"
|
|
41
|
-
"
|
|
42
|
-
"typescript": "^5.2.2"
|
|
34
|
+
"@types/node": "^24.9.2",
|
|
35
|
+
"@typescript-eslint/eslint-plugin": "^8.46.2",
|
|
36
|
+
"@typescript-eslint/parser": "^8.46.2",
|
|
37
|
+
"eslint": "^9.38.0",
|
|
38
|
+
"prettier": "^3.6.2",
|
|
39
|
+
"typescript": "^5.9.3"
|
|
43
40
|
},
|
|
44
41
|
"files": [
|
|
45
42
|
"dist",
|