@dfinity/ledger-icrc 6.0.1-next-2025-11-26 → 6.0.1
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/candid/icrc_index-ng.did +1 -1
- package/dist/candid/icrc_ledger.did +1 -1
- package/dist/canister.d.ts +3 -3
- package/dist/index.d.ts +0 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +4 -4
- package/dist/index.mjs +1 -1
- package/dist/index.mjs.map +4 -4
- package/dist/ledger.canister.d.ts +10 -4
- package/package.json +4 -4
- package/dist/candid/icrc_icrc-1.certified.idl.d.ts +0 -2
- package/dist/candid/icrc_icrc-1.certified.idl.js +0 -68
- package/dist/candid/icrc_icrc-1.d.ts +0 -69
- package/dist/candid/icrc_icrc-1.did +0 -54
- package/dist/candid/icrc_icrc-1.idl.d.ts +0 -2
- package/dist/candid/icrc_icrc-1.idl.js +0 -72
- package/dist/candid/icrc_icrc-10.certified.idl.d.ts +0 -2
- package/dist/candid/icrc_icrc-10.certified.idl.js +0 -20
- package/dist/candid/icrc_icrc-10.d.ts +0 -21
- package/dist/candid/icrc_icrc-10.did +0 -8
- package/dist/candid/icrc_icrc-10.idl.d.ts +0 -2
- package/dist/candid/icrc_icrc-10.idl.js +0 -24
- package/dist/nft-ledger.canister.d.ts +0 -16
- package/dist/types/canister.types.d.ts +0 -2
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
import { type Nullable, type QueryParams } from "@dfinity/utils";
|
|
1
|
+
import { Canister, type Nullable, type QueryParams } from "@dfinity/utils";
|
|
2
2
|
import type { Principal } from "@icp-sdk/core/principal";
|
|
3
3
|
import type { Account, Allowance, BlockIndex, GetBlocksResult, icrc21_consent_info, _SERVICE as IcrcLedgerService, StandardRecord, Tokens } from "./candid/icrc_ledger";
|
|
4
|
-
import { IcrcCanister } from "./canister";
|
|
5
4
|
import type { IcrcLedgerCanisterOptions } from "./types/canister.options";
|
|
6
|
-
import type { AllowanceParams, ApproveParams, GetBlocksParams, Icrc21ConsentMessageParams, TransferFromParams, TransferParams } from "./types/ledger.params";
|
|
5
|
+
import type { AllowanceParams, ApproveParams, BalanceParams, GetBlocksParams, Icrc21ConsentMessageParams, TransferFromParams, TransferParams } from "./types/ledger.params";
|
|
7
6
|
import type { IcrcTokenMetadataResponse } from "./types/ledger.responses";
|
|
8
|
-
export declare class IcrcLedgerCanister extends
|
|
7
|
+
export declare class IcrcLedgerCanister extends Canister<IcrcLedgerService> {
|
|
9
8
|
static create(options: IcrcLedgerCanisterOptions<IcrcLedgerService>): IcrcLedgerCanister;
|
|
10
9
|
/**
|
|
11
10
|
* The token metadata (name, symbol, etc.).
|
|
@@ -17,6 +16,13 @@ export declare class IcrcLedgerCanister extends IcrcCanister<IcrcLedgerService>
|
|
|
17
16
|
* @returns {Tokens} The ledger transaction fees in Tokens
|
|
18
17
|
*/
|
|
19
18
|
transactionFee: (params: QueryParams) => Promise<Tokens>;
|
|
19
|
+
/**
|
|
20
|
+
* Returns the balance for a given account provided as owner and with optional subaccount.
|
|
21
|
+
*
|
|
22
|
+
* @param {BalanceParams} params The parameters to get the balance of an account.
|
|
23
|
+
* @returns {Promise<Tokens>} The balance of the given account.
|
|
24
|
+
*/
|
|
25
|
+
balance: (params: BalanceParams) => Promise<Tokens>;
|
|
20
26
|
/**
|
|
21
27
|
* Transfers tokens from the sender to the given account.
|
|
22
28
|
*
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dfinity/ledger-icrc",
|
|
3
|
-
"version": "6.0.1
|
|
3
|
+
"version": "6.0.1",
|
|
4
4
|
"description": "A library for interfacing with ICRC ledgers on the Internet Computer.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"type": "module",
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
],
|
|
51
51
|
"homepage": "https://github.com/dfinity/icp-js-canisters#readme",
|
|
52
52
|
"peerDependencies": {
|
|
53
|
-
"@dfinity/utils": "
|
|
54
|
-
"@icp-sdk/core": "
|
|
53
|
+
"@dfinity/utils": "^4",
|
|
54
|
+
"@icp-sdk/core": "^4"
|
|
55
55
|
}
|
|
56
|
-
}
|
|
56
|
+
}
|
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
/* eslint-disable */
|
|
2
|
-
|
|
3
|
-
// @ts-nocheck
|
|
4
|
-
|
|
5
|
-
// This file was automatically generated by @icp-sdk/bindgen@0.2.0.
|
|
6
|
-
// You should NOT make any changes in this file as it will be overwritten.
|
|
7
|
-
// Additionally, you should also exclude this file from your linter and/or formatter to prevent it from being checked or modified.
|
|
8
|
-
|
|
9
|
-
export const idlFactory = ({ IDL }) => {
|
|
10
|
-
const Subaccount = IDL.Vec(IDL.Nat8);
|
|
11
|
-
const Account = IDL.Record({
|
|
12
|
-
owner: IDL.Principal,
|
|
13
|
-
subaccount: IDL.Opt(Subaccount),
|
|
14
|
-
});
|
|
15
|
-
const Value = IDL.Variant({
|
|
16
|
-
Int: IDL.Int,
|
|
17
|
-
Nat: IDL.Nat,
|
|
18
|
-
Blob: IDL.Vec(IDL.Nat8),
|
|
19
|
-
Text: IDL.Text,
|
|
20
|
-
});
|
|
21
|
-
const Timestamp = IDL.Nat64;
|
|
22
|
-
const TransferArgs = IDL.Record({
|
|
23
|
-
to: Account,
|
|
24
|
-
fee: IDL.Opt(IDL.Nat),
|
|
25
|
-
memo: IDL.Opt(IDL.Vec(IDL.Nat8)),
|
|
26
|
-
from_subaccount: IDL.Opt(Subaccount),
|
|
27
|
-
created_at_time: IDL.Opt(Timestamp),
|
|
28
|
-
amount: IDL.Nat,
|
|
29
|
-
});
|
|
30
|
-
const TransferError = IDL.Variant({
|
|
31
|
-
GenericError: IDL.Record({
|
|
32
|
-
message: IDL.Text,
|
|
33
|
-
error_code: IDL.Nat,
|
|
34
|
-
}),
|
|
35
|
-
TemporarilyUnavailable: IDL.Null,
|
|
36
|
-
BadBurn: IDL.Record({ min_burn_amount: IDL.Nat }),
|
|
37
|
-
Duplicate: IDL.Record({ duplicate_of: IDL.Nat }),
|
|
38
|
-
BadFee: IDL.Record({ expected_fee: IDL.Nat }),
|
|
39
|
-
CreatedInFuture: IDL.Record({ ledger_time: Timestamp }),
|
|
40
|
-
TooOld: IDL.Null,
|
|
41
|
-
InsufficientFunds: IDL.Record({ balance: IDL.Nat }),
|
|
42
|
-
});
|
|
43
|
-
|
|
44
|
-
return IDL.Service({
|
|
45
|
-
icrc1_balance_of: IDL.Func([Account], [IDL.Nat], []),
|
|
46
|
-
icrc1_decimals: IDL.Func([], [IDL.Nat8], []),
|
|
47
|
-
icrc1_fee: IDL.Func([], [IDL.Nat], []),
|
|
48
|
-
icrc1_metadata: IDL.Func([], [IDL.Vec(IDL.Tuple(IDL.Text, Value))], []),
|
|
49
|
-
icrc1_minting_account: IDL.Func([], [IDL.Opt(Account)], []),
|
|
50
|
-
icrc1_name: IDL.Func([], [IDL.Text], []),
|
|
51
|
-
icrc1_supported_standards: IDL.Func(
|
|
52
|
-
[],
|
|
53
|
-
[IDL.Vec(IDL.Record({ url: IDL.Text, name: IDL.Text }))],
|
|
54
|
-
[],
|
|
55
|
-
),
|
|
56
|
-
icrc1_symbol: IDL.Func([], [IDL.Text], []),
|
|
57
|
-
icrc1_total_supply: IDL.Func([], [IDL.Nat], []),
|
|
58
|
-
icrc1_transfer: IDL.Func(
|
|
59
|
-
[TransferArgs],
|
|
60
|
-
[IDL.Variant({ Ok: IDL.Nat, Err: TransferError })],
|
|
61
|
-
[],
|
|
62
|
-
),
|
|
63
|
-
});
|
|
64
|
-
};
|
|
65
|
-
|
|
66
|
-
export const init = ({ IDL }) => {
|
|
67
|
-
return [];
|
|
68
|
-
};
|
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
/* eslint-disable */
|
|
2
|
-
|
|
3
|
-
// @ts-nocheck
|
|
4
|
-
|
|
5
|
-
// This file was automatically generated by @icp-sdk/bindgen@0.2.0.
|
|
6
|
-
// You should NOT make any changes in this file as it will be overwritten.
|
|
7
|
-
// Additionally, you should also exclude this file from your linter and/or formatter to prevent it from being checked or modified.
|
|
8
|
-
|
|
9
|
-
import type { ActorMethod } from "@icp-sdk/core/agent";
|
|
10
|
-
import type { IDL } from "@icp-sdk/core/candid";
|
|
11
|
-
import type { Principal } from "@icp-sdk/core/principal";
|
|
12
|
-
|
|
13
|
-
export interface Account {
|
|
14
|
-
owner: Principal;
|
|
15
|
-
subaccount: [] | [Subaccount];
|
|
16
|
-
}
|
|
17
|
-
/**
|
|
18
|
-
* Number of nanoseconds between two [Timestamp]s.
|
|
19
|
-
*/
|
|
20
|
-
export type Duration = bigint;
|
|
21
|
-
export type Subaccount = Uint8Array;
|
|
22
|
-
/**
|
|
23
|
-
* Number of nanoseconds since the UNIX epoch in UTC timezone.
|
|
24
|
-
*/
|
|
25
|
-
export type Timestamp = bigint;
|
|
26
|
-
export interface TransferArgs {
|
|
27
|
-
to: Account;
|
|
28
|
-
fee: [] | [bigint];
|
|
29
|
-
memo: [] | [Uint8Array];
|
|
30
|
-
from_subaccount: [] | [Subaccount];
|
|
31
|
-
created_at_time: [] | [Timestamp];
|
|
32
|
-
amount: bigint;
|
|
33
|
-
}
|
|
34
|
-
export type TransferError =
|
|
35
|
-
| {
|
|
36
|
-
GenericError: { message: string; error_code: bigint };
|
|
37
|
-
}
|
|
38
|
-
| { TemporarilyUnavailable: null }
|
|
39
|
-
| { BadBurn: { min_burn_amount: bigint } }
|
|
40
|
-
| { Duplicate: { duplicate_of: bigint } }
|
|
41
|
-
| { BadFee: { expected_fee: bigint } }
|
|
42
|
-
| { CreatedInFuture: { ledger_time: Timestamp } }
|
|
43
|
-
| { TooOld: null }
|
|
44
|
-
| { InsufficientFunds: { balance: bigint } };
|
|
45
|
-
export type Value =
|
|
46
|
-
| { Int: bigint }
|
|
47
|
-
| { Nat: bigint }
|
|
48
|
-
| { Blob: Uint8Array }
|
|
49
|
-
| { Text: string };
|
|
50
|
-
export interface _SERVICE {
|
|
51
|
-
icrc1_balance_of: ActorMethod<[Account], bigint>;
|
|
52
|
-
icrc1_decimals: ActorMethod<[], number>;
|
|
53
|
-
icrc1_fee: ActorMethod<[], bigint>;
|
|
54
|
-
icrc1_metadata: ActorMethod<[], Array<[string, Value]>>;
|
|
55
|
-
icrc1_minting_account: ActorMethod<[], [] | [Account]>;
|
|
56
|
-
icrc1_name: ActorMethod<[], string>;
|
|
57
|
-
icrc1_supported_standards: ActorMethod<
|
|
58
|
-
[],
|
|
59
|
-
Array<{ url: string; name: string }>
|
|
60
|
-
>;
|
|
61
|
-
icrc1_symbol: ActorMethod<[], string>;
|
|
62
|
-
icrc1_total_supply: ActorMethod<[], bigint>;
|
|
63
|
-
icrc1_transfer: ActorMethod<
|
|
64
|
-
[TransferArgs],
|
|
65
|
-
{ Ok: bigint } | { Err: TransferError }
|
|
66
|
-
>;
|
|
67
|
-
}
|
|
68
|
-
export declare const idlFactory: IDL.InterfaceFactory;
|
|
69
|
-
export declare const init: (args: { IDL: typeof IDL }) => IDL.Type[];
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
// Generated from dfinity/ICRC-1 commit f8c39bec71b1ac7f6cdb1a6c9844726efc58be38 for file 'standards/ICRC-1/ICRC-1.did'
|
|
2
|
-
|
|
3
|
-
// Number of nanoseconds since the UNIX epoch in UTC timezone.
|
|
4
|
-
type Timestamp = nat64;
|
|
5
|
-
|
|
6
|
-
// Number of nanoseconds between two [Timestamp]s.
|
|
7
|
-
type Duration = nat64;
|
|
8
|
-
|
|
9
|
-
type Subaccount = blob;
|
|
10
|
-
|
|
11
|
-
type Account = record {
|
|
12
|
-
owner : principal;
|
|
13
|
-
subaccount : opt Subaccount;
|
|
14
|
-
};
|
|
15
|
-
|
|
16
|
-
type TransferArgs = record {
|
|
17
|
-
from_subaccount : opt Subaccount;
|
|
18
|
-
to : Account;
|
|
19
|
-
amount : nat;
|
|
20
|
-
fee : opt nat;
|
|
21
|
-
memo : opt blob;
|
|
22
|
-
created_at_time : opt Timestamp;
|
|
23
|
-
};
|
|
24
|
-
|
|
25
|
-
type TransferError = variant {
|
|
26
|
-
BadFee : record { expected_fee : nat };
|
|
27
|
-
BadBurn : record { min_burn_amount : nat };
|
|
28
|
-
InsufficientFunds : record { balance : nat };
|
|
29
|
-
TooOld;
|
|
30
|
-
CreatedInFuture: record { ledger_time : Timestamp };
|
|
31
|
-
Duplicate : record { duplicate_of : nat };
|
|
32
|
-
TemporarilyUnavailable;
|
|
33
|
-
GenericError : record { error_code : nat; message : text };
|
|
34
|
-
};
|
|
35
|
-
|
|
36
|
-
type Value = variant {
|
|
37
|
-
Nat : nat;
|
|
38
|
-
Int : int;
|
|
39
|
-
Text : text;
|
|
40
|
-
Blob : blob;
|
|
41
|
-
};
|
|
42
|
-
|
|
43
|
-
service : {
|
|
44
|
-
icrc1_metadata : () -> (vec record { text; Value; }) query;
|
|
45
|
-
icrc1_name : () -> (text) query;
|
|
46
|
-
icrc1_symbol : () -> (text) query;
|
|
47
|
-
icrc1_decimals : () -> (nat8) query;
|
|
48
|
-
icrc1_fee : () -> (nat) query;
|
|
49
|
-
icrc1_total_supply : () -> (nat) query;
|
|
50
|
-
icrc1_minting_account : () -> (opt Account) query;
|
|
51
|
-
icrc1_balance_of : (Account) -> (nat) query;
|
|
52
|
-
icrc1_transfer : (TransferArgs) -> (variant { Ok : nat; Err : TransferError });
|
|
53
|
-
icrc1_supported_standards : () -> (vec record { name : text; url : text }) query;
|
|
54
|
-
}
|
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
/* eslint-disable */
|
|
2
|
-
|
|
3
|
-
// @ts-nocheck
|
|
4
|
-
|
|
5
|
-
// This file was automatically generated by @icp-sdk/bindgen@0.2.0.
|
|
6
|
-
// You should NOT make any changes in this file as it will be overwritten.
|
|
7
|
-
// Additionally, you should also exclude this file from your linter and/or formatter to prevent it from being checked or modified.
|
|
8
|
-
|
|
9
|
-
export const idlFactory = ({ IDL }) => {
|
|
10
|
-
const Subaccount = IDL.Vec(IDL.Nat8);
|
|
11
|
-
const Account = IDL.Record({
|
|
12
|
-
owner: IDL.Principal,
|
|
13
|
-
subaccount: IDL.Opt(Subaccount),
|
|
14
|
-
});
|
|
15
|
-
const Value = IDL.Variant({
|
|
16
|
-
Int: IDL.Int,
|
|
17
|
-
Nat: IDL.Nat,
|
|
18
|
-
Blob: IDL.Vec(IDL.Nat8),
|
|
19
|
-
Text: IDL.Text,
|
|
20
|
-
});
|
|
21
|
-
const Timestamp = IDL.Nat64;
|
|
22
|
-
const TransferArgs = IDL.Record({
|
|
23
|
-
to: Account,
|
|
24
|
-
fee: IDL.Opt(IDL.Nat),
|
|
25
|
-
memo: IDL.Opt(IDL.Vec(IDL.Nat8)),
|
|
26
|
-
from_subaccount: IDL.Opt(Subaccount),
|
|
27
|
-
created_at_time: IDL.Opt(Timestamp),
|
|
28
|
-
amount: IDL.Nat,
|
|
29
|
-
});
|
|
30
|
-
const TransferError = IDL.Variant({
|
|
31
|
-
GenericError: IDL.Record({
|
|
32
|
-
message: IDL.Text,
|
|
33
|
-
error_code: IDL.Nat,
|
|
34
|
-
}),
|
|
35
|
-
TemporarilyUnavailable: IDL.Null,
|
|
36
|
-
BadBurn: IDL.Record({ min_burn_amount: IDL.Nat }),
|
|
37
|
-
Duplicate: IDL.Record({ duplicate_of: IDL.Nat }),
|
|
38
|
-
BadFee: IDL.Record({ expected_fee: IDL.Nat }),
|
|
39
|
-
CreatedInFuture: IDL.Record({ ledger_time: Timestamp }),
|
|
40
|
-
TooOld: IDL.Null,
|
|
41
|
-
InsufficientFunds: IDL.Record({ balance: IDL.Nat }),
|
|
42
|
-
});
|
|
43
|
-
|
|
44
|
-
return IDL.Service({
|
|
45
|
-
icrc1_balance_of: IDL.Func([Account], [IDL.Nat], ["query"]),
|
|
46
|
-
icrc1_decimals: IDL.Func([], [IDL.Nat8], ["query"]),
|
|
47
|
-
icrc1_fee: IDL.Func([], [IDL.Nat], ["query"]),
|
|
48
|
-
icrc1_metadata: IDL.Func(
|
|
49
|
-
[],
|
|
50
|
-
[IDL.Vec(IDL.Tuple(IDL.Text, Value))],
|
|
51
|
-
["query"],
|
|
52
|
-
),
|
|
53
|
-
icrc1_minting_account: IDL.Func([], [IDL.Opt(Account)], ["query"]),
|
|
54
|
-
icrc1_name: IDL.Func([], [IDL.Text], ["query"]),
|
|
55
|
-
icrc1_supported_standards: IDL.Func(
|
|
56
|
-
[],
|
|
57
|
-
[IDL.Vec(IDL.Record({ url: IDL.Text, name: IDL.Text }))],
|
|
58
|
-
["query"],
|
|
59
|
-
),
|
|
60
|
-
icrc1_symbol: IDL.Func([], [IDL.Text], ["query"]),
|
|
61
|
-
icrc1_total_supply: IDL.Func([], [IDL.Nat], ["query"]),
|
|
62
|
-
icrc1_transfer: IDL.Func(
|
|
63
|
-
[TransferArgs],
|
|
64
|
-
[IDL.Variant({ Ok: IDL.Nat, Err: TransferError })],
|
|
65
|
-
[],
|
|
66
|
-
),
|
|
67
|
-
});
|
|
68
|
-
};
|
|
69
|
-
|
|
70
|
-
export const init = ({ IDL }) => {
|
|
71
|
-
return [];
|
|
72
|
-
};
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
/* eslint-disable */
|
|
2
|
-
|
|
3
|
-
// @ts-nocheck
|
|
4
|
-
|
|
5
|
-
// This file was automatically generated by @icp-sdk/bindgen@0.2.0.
|
|
6
|
-
// You should NOT make any changes in this file as it will be overwritten.
|
|
7
|
-
// Additionally, you should also exclude this file from your linter and/or formatter to prevent it from being checked or modified.
|
|
8
|
-
|
|
9
|
-
export const idlFactory = ({ IDL }) => {
|
|
10
|
-
const SupportedStandard = IDL.Record({ url: IDL.Text, name: IDL.Text });
|
|
11
|
-
const SupportedStandardsResponse = IDL.Vec(SupportedStandard);
|
|
12
|
-
|
|
13
|
-
return IDL.Service({
|
|
14
|
-
icrc10_supported_standards: IDL.Func([], [SupportedStandardsResponse], []),
|
|
15
|
-
});
|
|
16
|
-
};
|
|
17
|
-
|
|
18
|
-
export const init = ({ IDL }) => {
|
|
19
|
-
return [];
|
|
20
|
-
};
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
/* eslint-disable */
|
|
2
|
-
|
|
3
|
-
// @ts-nocheck
|
|
4
|
-
|
|
5
|
-
// This file was automatically generated by @icp-sdk/bindgen@0.2.0.
|
|
6
|
-
// You should NOT make any changes in this file as it will be overwritten.
|
|
7
|
-
// Additionally, you should also exclude this file from your linter and/or formatter to prevent it from being checked or modified.
|
|
8
|
-
|
|
9
|
-
import type { ActorMethod } from "@icp-sdk/core/agent";
|
|
10
|
-
import type { IDL } from "@icp-sdk/core/candid";
|
|
11
|
-
|
|
12
|
-
export interface SupportedStandard {
|
|
13
|
-
url: string;
|
|
14
|
-
name: string;
|
|
15
|
-
}
|
|
16
|
-
export type SupportedStandardsResponse = Array<SupportedStandard>;
|
|
17
|
-
export interface _SERVICE {
|
|
18
|
-
icrc10_supported_standards: ActorMethod<[], SupportedStandardsResponse>;
|
|
19
|
-
}
|
|
20
|
-
export declare const idlFactory: IDL.InterfaceFactory;
|
|
21
|
-
export declare const init: (args: { IDL: typeof IDL }) => IDL.Type[];
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
// Generated from dfinity/ICRC commit 1df0c6af6ecca4f4eb1956c67b29c0d13279f1cd for file 'ICRCs/ICRC-10/ICRC-10.did'
|
|
2
|
-
|
|
3
|
-
type SupportedStandard = record { name : text; url : text; };
|
|
4
|
-
type SupportedStandardsResponse = vec SupportedStandard;
|
|
5
|
-
|
|
6
|
-
service : {
|
|
7
|
-
icrc10_supported_standards : () -> (SupportedStandardsResponse) query;
|
|
8
|
-
}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
/* eslint-disable */
|
|
2
|
-
|
|
3
|
-
// @ts-nocheck
|
|
4
|
-
|
|
5
|
-
// This file was automatically generated by @icp-sdk/bindgen@0.2.0.
|
|
6
|
-
// You should NOT make any changes in this file as it will be overwritten.
|
|
7
|
-
// Additionally, you should also exclude this file from your linter and/or formatter to prevent it from being checked or modified.
|
|
8
|
-
|
|
9
|
-
export const idlFactory = ({ IDL }) => {
|
|
10
|
-
const SupportedStandard = IDL.Record({ url: IDL.Text, name: IDL.Text });
|
|
11
|
-
const SupportedStandardsResponse = IDL.Vec(SupportedStandard);
|
|
12
|
-
|
|
13
|
-
return IDL.Service({
|
|
14
|
-
icrc10_supported_standards: IDL.Func(
|
|
15
|
-
[],
|
|
16
|
-
[SupportedStandardsResponse],
|
|
17
|
-
["query"],
|
|
18
|
-
),
|
|
19
|
-
});
|
|
20
|
-
};
|
|
21
|
-
|
|
22
|
-
export const init = ({ IDL }) => {
|
|
23
|
-
return [];
|
|
24
|
-
};
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { Canister, type QueryParams } from "@dfinity/utils";
|
|
2
|
-
import type { _SERVICE as IcrcNftLedgerService } from "./candid/icrc_nft-ledger";
|
|
3
|
-
import type { IcrcLedgerCanisterOptions } from "./types/canister.options";
|
|
4
|
-
import type { IcrcTokenMetadataResponse } from "./types/ledger.responses";
|
|
5
|
-
export declare class IcrcNftLedgerCanister extends Canister<IcrcNftLedgerService> {
|
|
6
|
-
static create(options: IcrcLedgerCanisterOptions<IcrcNftLedgerService>): IcrcNftLedgerCanister;
|
|
7
|
-
/**
|
|
8
|
-
* The collection metadata.
|
|
9
|
-
*
|
|
10
|
-
* @link https://github.com/dfinity/ICRC/blob/main/ICRCs/ICRC-7/ICRC-7.md#icrc7_collection_metadata
|
|
11
|
-
*
|
|
12
|
-
* @param {QueryParams} params The parameters to get the metadata of the collection.
|
|
13
|
-
* @returns {Promise<IcrcTokenMetadataResponse>} The metadata as a list of metadata type and its value.
|
|
14
|
-
*/
|
|
15
|
-
collectionMetadata: (params: QueryParams) => Promise<IcrcTokenMetadataResponse>;
|
|
16
|
-
}
|