@dfinity/nns 1.0.0 → 2.0.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/README.md +32 -261
- package/dist/cjs/index.cjs.js +2 -8
- package/dist/cjs/index.cjs.js.map +4 -4
- package/dist/esm/{chunk-OFXRZRFU.js → chunk-IJWQXUQ5.js} +2 -2
- package/dist/esm/chunk-KCY3PAEP.js +2 -0
- package/dist/esm/chunk-KCY3PAEP.js.map +7 -0
- package/dist/esm/chunk-LARRGLCK.js +20 -0
- package/dist/esm/chunk-LARRGLCK.js.map +7 -0
- package/dist/esm/{chunk-QJA26RTP.js → chunk-YKKQOXDQ.js} +2 -2
- package/dist/esm/genesis_token.canister.js +1 -1
- package/dist/esm/governance.canister.js +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/sns_wasm.canister.js +1 -1
- package/dist/types/canisters/governance/request.converters.d.ts +1 -1
- package/dist/types/constants/canister_ids.d.ts +0 -1
- package/dist/types/constants/constants.d.ts +0 -4
- package/dist/types/errors/governance.errors.d.ts +0 -2
- package/dist/types/governance.canister.d.ts +1 -1
- package/dist/types/index.d.ts +0 -7
- package/dist/types/types/common.d.ts +0 -1
- package/package.json +2 -1
- package/dist/candid/ledger.certified.idl.d.ts +0 -2
- package/dist/candid/ledger.certified.idl.js +0 -245
- package/dist/candid/ledger.d.ts +0 -215
- package/dist/candid/ledger.did +0 -380
- package/dist/candid/ledger.idl.d.ts +0 -2
- package/dist/candid/ledger.idl.js +0 -265
- package/dist/esm/account_identifier.js +0 -2
- package/dist/esm/account_identifier.js.map +0 -7
- package/dist/esm/chunk-2MZ7K2GY.js +0 -4
- package/dist/esm/chunk-2MZ7K2GY.js.map +0 -7
- package/dist/esm/chunk-DGJWOAUC.js +0 -2
- package/dist/esm/chunk-DGJWOAUC.js.map +0 -7
- package/dist/esm/chunk-H5FXE6EH.js +0 -8
- package/dist/esm/chunk-H5FXE6EH.js.map +0 -7
- package/dist/esm/chunk-IS3C7V4B.js +0 -2
- package/dist/esm/chunk-IS3C7V4B.js.map +0 -7
- package/dist/esm/chunk-JCUF5KWH.js +0 -2
- package/dist/esm/chunk-JCUF5KWH.js.map +0 -7
- package/dist/esm/chunk-TETJJ4EX.js +0 -20
- package/dist/esm/chunk-TETJJ4EX.js.map +0 -7
- package/dist/esm/chunk-WDXBCCBB.js +0 -2
- package/dist/esm/chunk-WDXBCCBB.js.map +0 -7
- package/dist/esm/chunk-ZMUQLPST.js +0 -2
- package/dist/esm/chunk-ZMUQLPST.js.map +0 -7
- package/dist/esm/icp.js +0 -2
- package/dist/esm/icp.js.map +0 -7
- package/dist/esm/ledger.canister.js +0 -2
- package/dist/esm/ledger.canister.js.map +0 -7
- package/dist/types/account_identifier.d.ts +0 -29
- package/dist/types/canisters/ledger/ledger.request.converts.d.ts +0 -7
- package/dist/types/errors/ledger.errors.d.ts +0 -27
- package/dist/types/icp.d.ts +0 -22
- package/dist/types/ledger.canister.d.ts +0 -48
- package/dist/types/types/ledger.options.d.ts +0 -15
- package/dist/types/types/ledger_converters.d.ts +0 -19
- package/dist/types/utils/account_identifier.utils.d.ts +0 -5
- package/dist/types/utils/accounts.utils.d.ts +0 -6
- /package/dist/esm/{chunk-OFXRZRFU.js.map → chunk-IJWQXUQ5.js.map} +0 -0
- /package/dist/esm/{chunk-QJA26RTP.js.map → chunk-YKKQOXDQ.js.map} +0 -0
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{d as i}from"./chunk-KCY3PAEP.js";import{createServices as l}from"@dfinity/utils";var s=({IDL:e})=>{let t=e.Record({id:e.Nat64}),r=e.Variant({Ok:e.Vec(t),Err:e.Text}),n=e.Variant({Ok:e.Null,Err:e.Text}),o=e.Record({error:e.Opt(e.Text),timestamp_seconds:e.Nat64,neuron_id:e.Opt(t)}),c=e.Record({authenticated_principal_id:e.Opt(e.Principal),successfully_transferred_neurons:e.Vec(o),is_whitelisted_for_forwarding:e.Bool,has_donated:e.Bool,failed_transferred_neurons:e.Vec(o),neuron_ids:e.Vec(t),has_claimed:e.Bool,has_forwarded:e.Bool,icpts:e.Nat32}),a=e.Variant({Ok:c,Err:e.Text});return e.Service({balance:e.Func([e.Text],[e.Nat32],[]),claim_neurons:e.Func([e.Text],[r],[]),donate_account:e.Func([e.Text],[n],[]),forward_whitelisted_unclaimed_accounts:e.Func([e.Null],[n],[]),get_account:e.Func([e.Text],[a],[]),get_build_metadata:e.Func([],[e.Text],[]),len:e.Func([],[e.Nat16],[]),total:e.Func([],[e.Nat32],[])})};var u=({IDL:e})=>{let t=e.Record({id:e.Nat64}),r=e.Variant({Ok:e.Vec(t),Err:e.Text}),n=e.Variant({Ok:e.Null,Err:e.Text}),o=e.Record({error:e.Opt(e.Text),timestamp_seconds:e.Nat64,neuron_id:e.Opt(t)}),c=e.Record({authenticated_principal_id:e.Opt(e.Principal),successfully_transferred_neurons:e.Vec(o),is_whitelisted_for_forwarding:e.Bool,has_donated:e.Bool,failed_transferred_neurons:e.Vec(o),neuron_ids:e.Vec(t),has_claimed:e.Bool,has_forwarded:e.Bool,icpts:e.Nat32}),a=e.Variant({Ok:c,Err:e.Text});return e.Service({balance:e.Func([e.Text],[e.Nat32],["query"]),claim_neurons:e.Func([e.Text],[r],[]),donate_account:e.Func([e.Text],[n],[]),forward_whitelisted_unclaimed_accounts:e.Func([e.Null],[n],[]),get_account:e.Func([e.Text],[a],["query"]),get_build_metadata:e.Func([],[e.Text],["query"]),len:e.Func([],[e.Nat16],["query"]),total:e.Func([],[e.Nat32],["query"])})};var d=class e{constructor(t){this.service=t;this.claimNeurons=async({hexPubKey:t})=>{let r=await this.service.claim_neurons(t);if("Ok"in r)return r.Ok.map(n=>n.id);throw new Error(r.Err)}}static create(t={}){let{service:r}=l({options:{...t,canisterId:t.canisterId??i},idlFactory:u,certifiedIdlFactory:s});return new e(r)}};export{d as a};
|
|
2
|
+
//# sourceMappingURL=chunk-YKKQOXDQ.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a}from"./chunk-
|
|
1
|
+
import{a}from"./chunk-YKKQOXDQ.js";import"./chunk-KCY3PAEP.js";export{a as GenesisTokenCanister};
|
|
2
2
|
//# sourceMappingURL=genesis_token.canister.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{n as a}from"./chunk-LARRGLCK.js";import"./chunk-KCY3PAEP.js";export{a as GovernanceCanister};
|
|
2
2
|
//# sourceMappingURL=governance.canister.js.map
|
package/dist/esm/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as
|
|
1
|
+
import{a as d}from"./chunk-YKKQOXDQ.js";import{a as m,b as c,c as x,d as N,e as v,f as y,g as P,h as b,i as B,j as S,k as g,l as C,m as w,n as i}from"./chunk-LARRGLCK.js";import{a as u}from"./chunk-IJWQXUQ5.js";import"./chunk-KCY3PAEP.js";var f=({recentBallots:n,proposalId:o})=>o?n.find(({proposalId:r})=>r===o)?.vote:void 0,I=({neurons:n,proposal:o})=>{let{ballots:e,proposalTimestampSeconds:r}=o;return n.filter(({createdTimestampSeconds:t,neuronId:s})=>{let p=t>r,a=e.find(({neuronId:l})=>l===s)===void 0;return p||a})},T=({neurons:n,proposal:o})=>{let{id:e}=o;return n.filter(({recentBallots:r,neuronId:t})=>f({recentBallots:r,proposalId:e})===void 0&&I({neurons:n,proposal:o}).find(({neuronId:s})=>s===t)===void 0)},_=({neurons:n,proposal:{id:o}})=>n.filter(({recentBallots:e})=>f({recentBallots:e,proposalId:o})!==void 0);export{c as CouldNotClaimNeuronError,P as FeatureNotSupportedError,d as GenesisTokenCanister,i as GovernanceCanister,v as GovernanceError,x as InsufficientAmountError,b as NeuronState,w as NnsFunction,S as ProposalRewardStatus,g as ProposalStatus,u as SnsWasmCanister,m as StakeNeuronError,B as Topic,N as UnrecognizedTypeError,y as UnsupportedValueError,C as Vote,I as ineligibleNeurons,T as votableNeurons,_ as votedNeurons};
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
package/dist/esm/index.js.map
CHANGED
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/utils/neurons.utils.ts"],
|
|
4
4
|
"sourcesContent": ["import type { Vote } from \"../enums/governance.enums\";\nimport type {\n Ballot,\n BallotInfo,\n NeuronInfo,\n ProposalId,\n ProposalInfo,\n} from \"../types/governance_converters\";\n\nconst voteForProposal = ({\n recentBallots,\n proposalId,\n}: {\n recentBallots: BallotInfo[];\n proposalId: ProposalId | undefined;\n}): Vote | undefined => {\n if (!proposalId) {\n return undefined;\n }\n\n const ballot: BallotInfo | undefined = recentBallots.find(\n ({ proposalId: id }: BallotInfo) => id === proposalId,\n );\n return ballot?.vote;\n};\n\n/**\n * Filter the neurons that are ineligible to vote to a proposal.\n *\n * This feature needs the ballots of the proposal to contains accurate data.\n * If the proposal has settled, as the ballots of the proposal are emptied for archive purpose, the function might return a list of ineligible neurons that are actually neurons that have not voted but would have been eligible.\n *\n * Long story short, check the status of the proposal before using this function.\n *\n * @param {neurons; proposal;} params\n * @param params.neurons The neurons to filter.\n * @param params.proposal The proposal to match against the selected neurons.\n */\nexport const ineligibleNeurons = ({\n neurons,\n proposal,\n}: {\n neurons: NeuronInfo[];\n proposal: ProposalInfo;\n}): NeuronInfo[] => {\n const { ballots, proposalTimestampSeconds } = proposal;\n\n return neurons.filter(({ createdTimestampSeconds, neuronId }: NeuronInfo) => {\n const createdSinceProposal: boolean =\n createdTimestampSeconds > proposalTimestampSeconds;\n\n const dissolveTooShort: boolean =\n ballots.find(\n ({ neuronId: ballotNeuronId }: Ballot) => ballotNeuronId === neuronId,\n ) === undefined;\n\n return createdSinceProposal || dissolveTooShort;\n });\n};\n\n/**\n * Filter the neurons that can vote for a proposal - i.e. the neurons that have not voted yet and are eligible\n *\n * @param {neurons; proposal;} params\n * @param params.neurons The neurons to filter.\n * @param params.proposal The proposal to match against the selected neurons.\n */\nexport const votableNeurons = ({\n neurons,\n proposal,\n}: {\n neurons: NeuronInfo[];\n proposal: ProposalInfo;\n}): NeuronInfo[] => {\n const { id: proposalId } = proposal;\n\n return neurons.filter(\n ({ recentBallots, neuronId }: NeuronInfo) =>\n voteForProposal({ recentBallots, proposalId }) === undefined &&\n ineligibleNeurons({ neurons, proposal }).find(\n ({ neuronId: ineligibleNeuronId }: NeuronInfo) =>\n ineligibleNeuronId === neuronId,\n ) === undefined,\n );\n};\n\n/**\n * Filter the neurons that have voted for a proposal.\n *\n * @param {neurons; proposal;} params\n * @param params.neurons The neurons to filter.\n * @param params.proposal The proposal for which some neurons might have already voted.\n */\nexport const votedNeurons = ({\n neurons,\n proposal: { id: proposalId },\n}: {\n neurons: NeuronInfo[];\n proposal: ProposalInfo;\n}): NeuronInfo[] =>\n neurons.filter(\n ({ recentBallots }: NeuronInfo) =>\n voteForProposal({ recentBallots, proposalId }) !== undefined,\n );\n"],
|
|
5
|
-
"mappings": "
|
|
5
|
+
"mappings": "+OASA,IAAMA,EAAkB,CAAC,CACvB,cAAAC,EACA,WAAAC,CACF,IAIOA,EAIkCD,EAAc,KACnD,CAAC,CAAE,WAAYE,CAAG,IAAkBA,IAAOD,CAC7C,GACe,KANb,OAqBSE,EAAoB,CAAC,CAChC,QAAAC,EACA,SAAAC,CACF,IAGoB,CAClB,GAAM,CAAE,QAAAC,EAAS,yBAAAC,CAAyB,EAAIF,EAE9C,OAAOD,EAAQ,OAAO,CAAC,CAAE,wBAAAI,EAAyB,SAAAC,CAAS,IAAkB,CAC3E,IAAMC,EACJF,EAA0BD,EAEtBI,EACJL,EAAQ,KACN,CAAC,CAAE,SAAUM,CAAe,IAAcA,IAAmBH,CAC/D,IAAM,OAER,OAAOC,GAAwBC,CACjC,CAAC,CACH,EASaE,EAAiB,CAAC,CAC7B,QAAAT,EACA,SAAAC,CACF,IAGoB,CAClB,GAAM,CAAE,GAAIJ,CAAW,EAAII,EAE3B,OAAOD,EAAQ,OACb,CAAC,CAAE,cAAAJ,EAAe,SAAAS,CAAS,IACzBV,EAAgB,CAAE,cAAAC,EAAe,WAAAC,CAAW,CAAC,IAAM,QACnDE,EAAkB,CAAE,QAAAC,EAAS,SAAAC,CAAS,CAAC,EAAE,KACvC,CAAC,CAAE,SAAUS,CAAmB,IAC9BA,IAAuBL,CAC3B,IAAM,MACV,CACF,EASaM,EAAe,CAAC,CAC3B,QAAAX,EACA,SAAU,CAAE,GAAIH,CAAW,CAC7B,IAIEG,EAAQ,OACN,CAAC,CAAE,cAAAJ,CAAc,IACfD,EAAgB,CAAE,cAAAC,EAAe,WAAAC,CAAW,CAAC,IAAM,MACvD",
|
|
6
6
|
"names": ["voteForProposal", "recentBallots", "proposalId", "id", "ineligibleNeurons", "neurons", "proposal", "ballots", "proposalTimestampSeconds", "createdTimestampSeconds", "neuronId", "createdSinceProposal", "dissolveTooShort", "ballotNeuronId", "votableNeurons", "ineligibleNeuronId", "votedNeurons"]
|
|
7
7
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a}from"./chunk-
|
|
1
|
+
import{a}from"./chunk-IJWQXUQ5.js";import"./chunk-KCY3PAEP.js";export{a as SnsWasmCanister};
|
|
2
2
|
//# sourceMappingURL=sns_wasm.canister.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import type { AccountIdentifier as AccountIdentifierClass } from "@dfinity/ledger-icp";
|
|
1
2
|
import { Principal } from "@dfinity/principal";
|
|
2
3
|
import type { ListProposalInfo, Command as RawCommand, ListNeurons as RawListNeurons, ManageNeuron as RawManageNeuron, Operation as RawOperation } from "../../../candid/governance";
|
|
3
|
-
import type { AccountIdentifier as AccountIdentifierClass } from "../../account_identifier";
|
|
4
4
|
import type { Vote } from "../../enums/governance.enums";
|
|
5
5
|
import type { E8s, NeuronId } from "../../types/common";
|
|
6
6
|
import type { ClaimOrRefreshNeuronRequest, DisburseToNeuronRequest, FollowRequest, ListProposalsRequest, MakeProposalRequest, ManageNeuron, ProposalId } from "../../types/governance_converters";
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { Principal } from "@dfinity/principal";
|
|
2
2
|
export declare const GOVERNANCE_CANISTER_ID: Principal;
|
|
3
3
|
export declare const MAINNET_GOVERNANCE_CANISTER_ID: Principal;
|
|
4
|
-
export declare const MAINNET_LEDGER_CANISTER_ID: Principal;
|
|
5
4
|
export declare const MAINNET_GENESIS_TOKEN_CANISTER_ID: Principal;
|
|
6
5
|
export declare const MAINNET_SNS_WASM_CANISTER_ID: Principal;
|
|
@@ -13,8 +13,6 @@ export declare class GovernanceError extends Error {
|
|
|
13
13
|
readonly detail: GovernanceErrorDetail;
|
|
14
14
|
constructor(detail: GovernanceErrorDetail);
|
|
15
15
|
}
|
|
16
|
-
export declare class InvalidAccountIDError extends Error {
|
|
17
|
-
}
|
|
18
16
|
/**
|
|
19
17
|
* An error used to ensure at compile-time that it's never reached.
|
|
20
18
|
*/
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
+
import type { LedgerCanister } from "@dfinity/ledger-icp";
|
|
1
2
|
import type { Principal } from "@dfinity/principal";
|
|
2
3
|
import type { RewardEvent } from "../candid/governance";
|
|
3
4
|
import type { Vote } from "./enums/governance.enums";
|
|
4
|
-
import type { LedgerCanister } from "./ledger.canister";
|
|
5
5
|
import type { E8s, NeuronId } from "./types/common";
|
|
6
6
|
import type { GovernanceCanisterOptions } from "./types/governance.options";
|
|
7
7
|
import type { ClaimOrRefreshNeuronRequest, FollowRequest, KnownNeuron, ListProposalsRequest, ListProposalsResponse, MakeProposalRequest, NeuronInfo, ProposalId, ProposalInfo } from "./types/governance_converters";
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,19 +1,12 @@
|
|
|
1
1
|
export type { RewardEvent } from "../candid/governance";
|
|
2
2
|
export type { DeployedSns } from "../candid/sns_wasm";
|
|
3
|
-
export { AccountIdentifier, SubAccount } from "./account_identifier";
|
|
4
3
|
export * from "./enums/governance.enums";
|
|
5
4
|
export * from "./errors/governance.errors";
|
|
6
|
-
export * from "./errors/ledger.errors";
|
|
7
5
|
export { GenesisTokenCanister } from "./genesis_token.canister";
|
|
8
6
|
export { GovernanceCanister } from "./governance.canister";
|
|
9
|
-
export { ICP } from "./icp";
|
|
10
|
-
export { LedgerCanister } from "./ledger.canister";
|
|
11
7
|
export { SnsWasmCanister } from "./sns_wasm.canister";
|
|
12
8
|
export * from "./types/common";
|
|
13
9
|
export * from "./types/governance.options";
|
|
14
10
|
export * from "./types/governance_converters";
|
|
15
|
-
export * from "./types/ledger.options";
|
|
16
11
|
export type { SnsWasmCanisterOptions } from "./types/sns_wasm.options";
|
|
17
|
-
export * from "./utils/account_identifier.utils";
|
|
18
|
-
export * from "./utils/accounts.utils";
|
|
19
12
|
export * from "./utils/neurons.utils";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dfinity/nns",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.0",
|
|
4
4
|
"description": "A library for interfacing with the Internet Computer's Network Nervous System.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"main": "dist/cjs/index.cjs.js",
|
|
@@ -53,6 +53,7 @@
|
|
|
53
53
|
"peerDependencies": {
|
|
54
54
|
"@dfinity/agent": "^0.19.2",
|
|
55
55
|
"@dfinity/candid": "^0.19.2",
|
|
56
|
+
"@dfinity/ledger-icp": "^1.0.0",
|
|
56
57
|
"@dfinity/nns-proto": "^1.0.0",
|
|
57
58
|
"@dfinity/principal": "^0.19.2",
|
|
58
59
|
"@dfinity/utils": "^1.0.0"
|
|
@@ -1,245 +0,0 @@
|
|
|
1
|
-
/* Do not edit. Compiled with ./scripts/compile-idl-js from packages/nns/candid/ledger.did */
|
|
2
|
-
export const idlFactory = ({ IDL }) => {
|
|
3
|
-
const SubAccount = IDL.Vec(IDL.Nat8);
|
|
4
|
-
const Account = IDL.Record({
|
|
5
|
-
'owner' : IDL.Principal,
|
|
6
|
-
'subaccount' : IDL.Opt(SubAccount),
|
|
7
|
-
});
|
|
8
|
-
const UpgradeArgs = IDL.Record({
|
|
9
|
-
'maximum_number_of_accounts' : IDL.Opt(IDL.Nat64),
|
|
10
|
-
'icrc1_minting_account' : IDL.Opt(Account),
|
|
11
|
-
});
|
|
12
|
-
const Tokens = IDL.Record({ 'e8s' : IDL.Nat64 });
|
|
13
|
-
const TextAccountIdentifier = IDL.Text;
|
|
14
|
-
const Duration = IDL.Record({ 'secs' : IDL.Nat64, 'nanos' : IDL.Nat32 });
|
|
15
|
-
const ArchiveOptions = IDL.Record({
|
|
16
|
-
'num_blocks_to_archive' : IDL.Nat64,
|
|
17
|
-
'trigger_threshold' : IDL.Nat64,
|
|
18
|
-
'max_message_size_bytes' : IDL.Opt(IDL.Nat64),
|
|
19
|
-
'cycles_for_archive_creation' : IDL.Opt(IDL.Nat64),
|
|
20
|
-
'node_max_memory_size_bytes' : IDL.Opt(IDL.Nat64),
|
|
21
|
-
'controller_id' : IDL.Principal,
|
|
22
|
-
});
|
|
23
|
-
const InitArgs = IDL.Record({
|
|
24
|
-
'send_whitelist' : IDL.Vec(IDL.Principal),
|
|
25
|
-
'token_symbol' : IDL.Opt(IDL.Text),
|
|
26
|
-
'transfer_fee' : IDL.Opt(Tokens),
|
|
27
|
-
'minting_account' : TextAccountIdentifier,
|
|
28
|
-
'transaction_window' : IDL.Opt(Duration),
|
|
29
|
-
'max_message_size_bytes' : IDL.Opt(IDL.Nat64),
|
|
30
|
-
'icrc1_minting_account' : IDL.Opt(Account),
|
|
31
|
-
'archive_options' : IDL.Opt(ArchiveOptions),
|
|
32
|
-
'initial_values' : IDL.Vec(IDL.Tuple(TextAccountIdentifier, Tokens)),
|
|
33
|
-
'token_name' : IDL.Opt(IDL.Text),
|
|
34
|
-
});
|
|
35
|
-
const LedgerCanisterPayload = IDL.Variant({
|
|
36
|
-
'Upgrade' : IDL.Opt(UpgradeArgs),
|
|
37
|
-
'Init' : InitArgs,
|
|
38
|
-
});
|
|
39
|
-
const BlockIndex = IDL.Nat64;
|
|
40
|
-
const GetBlocksArgs = IDL.Record({
|
|
41
|
-
'start' : BlockIndex,
|
|
42
|
-
'length' : IDL.Nat64,
|
|
43
|
-
});
|
|
44
|
-
const Memo = IDL.Nat64;
|
|
45
|
-
const AccountIdentifier = IDL.Vec(IDL.Nat8);
|
|
46
|
-
const TimeStamp = IDL.Record({ 'timestamp_nanos' : IDL.Nat64 });
|
|
47
|
-
const Operation = IDL.Variant({
|
|
48
|
-
'Approve' : IDL.Record({
|
|
49
|
-
'fee' : Tokens,
|
|
50
|
-
'from' : AccountIdentifier,
|
|
51
|
-
'allowance_e8s' : IDL.Int,
|
|
52
|
-
'expires_at' : IDL.Opt(TimeStamp),
|
|
53
|
-
'spender' : AccountIdentifier,
|
|
54
|
-
}),
|
|
55
|
-
'Burn' : IDL.Record({ 'from' : AccountIdentifier, 'amount' : Tokens }),
|
|
56
|
-
'Mint' : IDL.Record({ 'to' : AccountIdentifier, 'amount' : Tokens }),
|
|
57
|
-
'Transfer' : IDL.Record({
|
|
58
|
-
'to' : AccountIdentifier,
|
|
59
|
-
'fee' : Tokens,
|
|
60
|
-
'from' : AccountIdentifier,
|
|
61
|
-
'amount' : Tokens,
|
|
62
|
-
}),
|
|
63
|
-
'TransferFrom' : IDL.Record({
|
|
64
|
-
'to' : AccountIdentifier,
|
|
65
|
-
'fee' : Tokens,
|
|
66
|
-
'from' : AccountIdentifier,
|
|
67
|
-
'amount' : Tokens,
|
|
68
|
-
'spender' : AccountIdentifier,
|
|
69
|
-
}),
|
|
70
|
-
});
|
|
71
|
-
const Transaction = IDL.Record({
|
|
72
|
-
'memo' : Memo,
|
|
73
|
-
'icrc1_memo' : IDL.Opt(IDL.Vec(IDL.Nat8)),
|
|
74
|
-
'operation' : IDL.Opt(Operation),
|
|
75
|
-
'created_at_time' : TimeStamp,
|
|
76
|
-
});
|
|
77
|
-
const Block = IDL.Record({
|
|
78
|
-
'transaction' : Transaction,
|
|
79
|
-
'timestamp' : TimeStamp,
|
|
80
|
-
'parent_hash' : IDL.Opt(IDL.Vec(IDL.Nat8)),
|
|
81
|
-
});
|
|
82
|
-
const BlockRange = IDL.Record({ 'blocks' : IDL.Vec(Block) });
|
|
83
|
-
const QueryArchiveError = IDL.Variant({
|
|
84
|
-
'BadFirstBlockIndex' : IDL.Record({
|
|
85
|
-
'requested_index' : BlockIndex,
|
|
86
|
-
'first_valid_index' : BlockIndex,
|
|
87
|
-
}),
|
|
88
|
-
'Other' : IDL.Record({
|
|
89
|
-
'error_message' : IDL.Text,
|
|
90
|
-
'error_code' : IDL.Nat64,
|
|
91
|
-
}),
|
|
92
|
-
});
|
|
93
|
-
const QueryArchiveResult = IDL.Variant({
|
|
94
|
-
'Ok' : BlockRange,
|
|
95
|
-
'Err' : QueryArchiveError,
|
|
96
|
-
});
|
|
97
|
-
const QueryArchiveFn = IDL.Func([GetBlocksArgs], [QueryArchiveResult], []);
|
|
98
|
-
const QueryBlocksResponse = IDL.Record({
|
|
99
|
-
'certificate' : IDL.Opt(IDL.Vec(IDL.Nat8)),
|
|
100
|
-
'blocks' : IDL.Vec(Block),
|
|
101
|
-
'chain_length' : IDL.Nat64,
|
|
102
|
-
'first_block_index' : BlockIndex,
|
|
103
|
-
'archived_blocks' : IDL.Vec(
|
|
104
|
-
IDL.Record({
|
|
105
|
-
'callback' : QueryArchiveFn,
|
|
106
|
-
'start' : BlockIndex,
|
|
107
|
-
'length' : IDL.Nat64,
|
|
108
|
-
})
|
|
109
|
-
),
|
|
110
|
-
});
|
|
111
|
-
const AccountBalanceArgs = IDL.Record({ 'account' : AccountIdentifier });
|
|
112
|
-
const AccountBalanceArgsDfx = IDL.Record({
|
|
113
|
-
'account' : TextAccountIdentifier,
|
|
114
|
-
});
|
|
115
|
-
const Archive = IDL.Record({ 'canister_id' : IDL.Principal });
|
|
116
|
-
const Archives = IDL.Record({ 'archives' : IDL.Vec(Archive) });
|
|
117
|
-
const Icrc1Tokens = IDL.Nat;
|
|
118
|
-
const Value = IDL.Variant({
|
|
119
|
-
'Int' : IDL.Int,
|
|
120
|
-
'Nat' : IDL.Nat,
|
|
121
|
-
'Blob' : IDL.Vec(IDL.Nat8),
|
|
122
|
-
'Text' : IDL.Text,
|
|
123
|
-
});
|
|
124
|
-
const Icrc1Timestamp = IDL.Nat64;
|
|
125
|
-
const TransferArg = IDL.Record({
|
|
126
|
-
'to' : Account,
|
|
127
|
-
'fee' : IDL.Opt(Icrc1Tokens),
|
|
128
|
-
'memo' : IDL.Opt(IDL.Vec(IDL.Nat8)),
|
|
129
|
-
'from_subaccount' : IDL.Opt(SubAccount),
|
|
130
|
-
'created_at_time' : IDL.Opt(Icrc1Timestamp),
|
|
131
|
-
'amount' : Icrc1Tokens,
|
|
132
|
-
});
|
|
133
|
-
const Icrc1BlockIndex = IDL.Nat;
|
|
134
|
-
const Icrc1TransferError = IDL.Variant({
|
|
135
|
-
'GenericError' : IDL.Record({
|
|
136
|
-
'message' : IDL.Text,
|
|
137
|
-
'error_code' : IDL.Nat,
|
|
138
|
-
}),
|
|
139
|
-
'TemporarilyUnavailable' : IDL.Null,
|
|
140
|
-
'BadBurn' : IDL.Record({ 'min_burn_amount' : Icrc1Tokens }),
|
|
141
|
-
'Duplicate' : IDL.Record({ 'duplicate_of' : Icrc1BlockIndex }),
|
|
142
|
-
'BadFee' : IDL.Record({ 'expected_fee' : Icrc1Tokens }),
|
|
143
|
-
'CreatedInFuture' : IDL.Record({ 'ledger_time' : IDL.Nat64 }),
|
|
144
|
-
'TooOld' : IDL.Null,
|
|
145
|
-
'InsufficientFunds' : IDL.Record({ 'balance' : Icrc1Tokens }),
|
|
146
|
-
});
|
|
147
|
-
const Icrc1TransferResult = IDL.Variant({
|
|
148
|
-
'Ok' : Icrc1BlockIndex,
|
|
149
|
-
'Err' : Icrc1TransferError,
|
|
150
|
-
});
|
|
151
|
-
const SendArgs = IDL.Record({
|
|
152
|
-
'to' : TextAccountIdentifier,
|
|
153
|
-
'fee' : Tokens,
|
|
154
|
-
'memo' : Memo,
|
|
155
|
-
'from_subaccount' : IDL.Opt(SubAccount),
|
|
156
|
-
'created_at_time' : IDL.Opt(TimeStamp),
|
|
157
|
-
'amount' : Tokens,
|
|
158
|
-
});
|
|
159
|
-
const TransferArgs = IDL.Record({
|
|
160
|
-
'to' : AccountIdentifier,
|
|
161
|
-
'fee' : Tokens,
|
|
162
|
-
'memo' : Memo,
|
|
163
|
-
'from_subaccount' : IDL.Opt(SubAccount),
|
|
164
|
-
'created_at_time' : IDL.Opt(TimeStamp),
|
|
165
|
-
'amount' : Tokens,
|
|
166
|
-
});
|
|
167
|
-
const TransferError = IDL.Variant({
|
|
168
|
-
'TxTooOld' : IDL.Record({ 'allowed_window_nanos' : IDL.Nat64 }),
|
|
169
|
-
'BadFee' : IDL.Record({ 'expected_fee' : Tokens }),
|
|
170
|
-
'TxDuplicate' : IDL.Record({ 'duplicate_of' : BlockIndex }),
|
|
171
|
-
'TxCreatedInFuture' : IDL.Null,
|
|
172
|
-
'InsufficientFunds' : IDL.Record({ 'balance' : Tokens }),
|
|
173
|
-
});
|
|
174
|
-
const TransferResult = IDL.Variant({
|
|
175
|
-
'Ok' : BlockIndex,
|
|
176
|
-
'Err' : TransferError,
|
|
177
|
-
});
|
|
178
|
-
const TransferFeeArg = IDL.Record({});
|
|
179
|
-
const TransferFee = IDL.Record({ 'transfer_fee' : Tokens });
|
|
180
|
-
return IDL.Service({
|
|
181
|
-
'_blocks' : IDL.Func([GetBlocksArgs], [QueryBlocksResponse], []),
|
|
182
|
-
'account_balance' : IDL.Func([AccountBalanceArgs], [Tokens], []),
|
|
183
|
-
'account_balance_dfx' : IDL.Func([AccountBalanceArgsDfx], [Tokens], []),
|
|
184
|
-
'archives' : IDL.Func([], [Archives], []),
|
|
185
|
-
'decimals' : IDL.Func([], [IDL.Record({ 'decimals' : IDL.Nat32 })], []),
|
|
186
|
-
'icrc1_balance_of' : IDL.Func([Account], [Icrc1Tokens], []),
|
|
187
|
-
'icrc1_decimals' : IDL.Func([], [IDL.Nat8], []),
|
|
188
|
-
'icrc1_fee' : IDL.Func([], [Icrc1Tokens], []),
|
|
189
|
-
'icrc1_metadata' : IDL.Func([], [IDL.Vec(IDL.Tuple(IDL.Text, Value))], []),
|
|
190
|
-
'icrc1_minting_account' : IDL.Func([], [IDL.Opt(Account)], []),
|
|
191
|
-
'icrc1_name' : IDL.Func([], [IDL.Text], []),
|
|
192
|
-
'icrc1_supported_standards' : IDL.Func(
|
|
193
|
-
[],
|
|
194
|
-
[IDL.Vec(IDL.Record({ 'url' : IDL.Text, 'name' : IDL.Text }))],
|
|
195
|
-
[],
|
|
196
|
-
),
|
|
197
|
-
'icrc1_symbol' : IDL.Func([], [IDL.Text], []),
|
|
198
|
-
'icrc1_total_supply' : IDL.Func([], [Icrc1Tokens], []),
|
|
199
|
-
'icrc1_transfer' : IDL.Func([TransferArg], [Icrc1TransferResult], []),
|
|
200
|
-
'name' : IDL.Func([], [IDL.Record({ 'name' : IDL.Text })], []),
|
|
201
|
-
'send_dfx' : IDL.Func([SendArgs], [BlockIndex], []),
|
|
202
|
-
'symbol' : IDL.Func([], [IDL.Record({ 'symbol' : IDL.Text })], []),
|
|
203
|
-
'transfer' : IDL.Func([TransferArgs], [TransferResult], []),
|
|
204
|
-
'transfer_fee' : IDL.Func([TransferFeeArg], [TransferFee], []),
|
|
205
|
-
});
|
|
206
|
-
};
|
|
207
|
-
export const init = ({ IDL }) => {
|
|
208
|
-
const SubAccount = IDL.Vec(IDL.Nat8);
|
|
209
|
-
const Account = IDL.Record({
|
|
210
|
-
'owner' : IDL.Principal,
|
|
211
|
-
'subaccount' : IDL.Opt(SubAccount),
|
|
212
|
-
});
|
|
213
|
-
const UpgradeArgs = IDL.Record({
|
|
214
|
-
'maximum_number_of_accounts' : IDL.Opt(IDL.Nat64),
|
|
215
|
-
'icrc1_minting_account' : IDL.Opt(Account),
|
|
216
|
-
});
|
|
217
|
-
const Tokens = IDL.Record({ 'e8s' : IDL.Nat64 });
|
|
218
|
-
const TextAccountIdentifier = IDL.Text;
|
|
219
|
-
const Duration = IDL.Record({ 'secs' : IDL.Nat64, 'nanos' : IDL.Nat32 });
|
|
220
|
-
const ArchiveOptions = IDL.Record({
|
|
221
|
-
'num_blocks_to_archive' : IDL.Nat64,
|
|
222
|
-
'trigger_threshold' : IDL.Nat64,
|
|
223
|
-
'max_message_size_bytes' : IDL.Opt(IDL.Nat64),
|
|
224
|
-
'cycles_for_archive_creation' : IDL.Opt(IDL.Nat64),
|
|
225
|
-
'node_max_memory_size_bytes' : IDL.Opt(IDL.Nat64),
|
|
226
|
-
'controller_id' : IDL.Principal,
|
|
227
|
-
});
|
|
228
|
-
const InitArgs = IDL.Record({
|
|
229
|
-
'send_whitelist' : IDL.Vec(IDL.Principal),
|
|
230
|
-
'token_symbol' : IDL.Opt(IDL.Text),
|
|
231
|
-
'transfer_fee' : IDL.Opt(Tokens),
|
|
232
|
-
'minting_account' : TextAccountIdentifier,
|
|
233
|
-
'transaction_window' : IDL.Opt(Duration),
|
|
234
|
-
'max_message_size_bytes' : IDL.Opt(IDL.Nat64),
|
|
235
|
-
'icrc1_minting_account' : IDL.Opt(Account),
|
|
236
|
-
'archive_options' : IDL.Opt(ArchiveOptions),
|
|
237
|
-
'initial_values' : IDL.Vec(IDL.Tuple(TextAccountIdentifier, Tokens)),
|
|
238
|
-
'token_name' : IDL.Opt(IDL.Text),
|
|
239
|
-
});
|
|
240
|
-
const LedgerCanisterPayload = IDL.Variant({
|
|
241
|
-
'Upgrade' : IDL.Opt(UpgradeArgs),
|
|
242
|
-
'Init' : InitArgs,
|
|
243
|
-
});
|
|
244
|
-
return [LedgerCanisterPayload];
|
|
245
|
-
};
|
package/dist/candid/ledger.d.ts
DELETED
|
@@ -1,215 +0,0 @@
|
|
|
1
|
-
import type { ActorMethod } from "@dfinity/agent";
|
|
2
|
-
import type { Principal } from "@dfinity/principal";
|
|
3
|
-
|
|
4
|
-
export interface Account {
|
|
5
|
-
owner: Principal;
|
|
6
|
-
subaccount: [] | [SubAccount];
|
|
7
|
-
}
|
|
8
|
-
export interface AccountBalanceArgs {
|
|
9
|
-
account: AccountIdentifier;
|
|
10
|
-
}
|
|
11
|
-
export interface AccountBalanceArgsDfx {
|
|
12
|
-
account: TextAccountIdentifier;
|
|
13
|
-
}
|
|
14
|
-
export type AccountIdentifier = Uint8Array;
|
|
15
|
-
export interface Archive {
|
|
16
|
-
canister_id: Principal;
|
|
17
|
-
}
|
|
18
|
-
export interface ArchiveOptions {
|
|
19
|
-
num_blocks_to_archive: bigint;
|
|
20
|
-
trigger_threshold: bigint;
|
|
21
|
-
max_message_size_bytes: [] | [bigint];
|
|
22
|
-
cycles_for_archive_creation: [] | [bigint];
|
|
23
|
-
node_max_memory_size_bytes: [] | [bigint];
|
|
24
|
-
controller_id: Principal;
|
|
25
|
-
}
|
|
26
|
-
export interface Archives {
|
|
27
|
-
archives: Array<Archive>;
|
|
28
|
-
}
|
|
29
|
-
export interface Block {
|
|
30
|
-
transaction: Transaction;
|
|
31
|
-
timestamp: TimeStamp;
|
|
32
|
-
parent_hash: [] | [Uint8Array];
|
|
33
|
-
}
|
|
34
|
-
export type BlockIndex = bigint;
|
|
35
|
-
export interface BlockRange {
|
|
36
|
-
blocks: Array<Block>;
|
|
37
|
-
}
|
|
38
|
-
export interface Duration {
|
|
39
|
-
secs: bigint;
|
|
40
|
-
nanos: number;
|
|
41
|
-
}
|
|
42
|
-
export interface GetBlocksArgs {
|
|
43
|
-
start: BlockIndex;
|
|
44
|
-
length: bigint;
|
|
45
|
-
}
|
|
46
|
-
export type Icrc1BlockIndex = bigint;
|
|
47
|
-
export type Icrc1Timestamp = bigint;
|
|
48
|
-
export type Icrc1Tokens = bigint;
|
|
49
|
-
export type Icrc1TransferError =
|
|
50
|
-
| {
|
|
51
|
-
GenericError: { message: string; error_code: bigint };
|
|
52
|
-
}
|
|
53
|
-
| { TemporarilyUnavailable: null }
|
|
54
|
-
| { BadBurn: { min_burn_amount: Icrc1Tokens } }
|
|
55
|
-
| { Duplicate: { duplicate_of: Icrc1BlockIndex } }
|
|
56
|
-
| { BadFee: { expected_fee: Icrc1Tokens } }
|
|
57
|
-
| { CreatedInFuture: { ledger_time: bigint } }
|
|
58
|
-
| { TooOld: null }
|
|
59
|
-
| { InsufficientFunds: { balance: Icrc1Tokens } };
|
|
60
|
-
export type Icrc1TransferResult =
|
|
61
|
-
| { Ok: Icrc1BlockIndex }
|
|
62
|
-
| { Err: Icrc1TransferError };
|
|
63
|
-
export interface InitArgs {
|
|
64
|
-
send_whitelist: Array<Principal>;
|
|
65
|
-
token_symbol: [] | [string];
|
|
66
|
-
transfer_fee: [] | [Tokens];
|
|
67
|
-
minting_account: TextAccountIdentifier;
|
|
68
|
-
transaction_window: [] | [Duration];
|
|
69
|
-
max_message_size_bytes: [] | [bigint];
|
|
70
|
-
icrc1_minting_account: [] | [Account];
|
|
71
|
-
archive_options: [] | [ArchiveOptions];
|
|
72
|
-
initial_values: Array<[TextAccountIdentifier, Tokens]>;
|
|
73
|
-
token_name: [] | [string];
|
|
74
|
-
}
|
|
75
|
-
export type LedgerCanisterPayload =
|
|
76
|
-
| { Upgrade: [] | [UpgradeArgs] }
|
|
77
|
-
| { Init: InitArgs };
|
|
78
|
-
export type Memo = bigint;
|
|
79
|
-
export type Operation =
|
|
80
|
-
| {
|
|
81
|
-
Approve: {
|
|
82
|
-
fee: Tokens;
|
|
83
|
-
from: AccountIdentifier;
|
|
84
|
-
allowance_e8s: bigint;
|
|
85
|
-
expires_at: [] | [TimeStamp];
|
|
86
|
-
spender: AccountIdentifier;
|
|
87
|
-
};
|
|
88
|
-
}
|
|
89
|
-
| { Burn: { from: AccountIdentifier; amount: Tokens } }
|
|
90
|
-
| { Mint: { to: AccountIdentifier; amount: Tokens } }
|
|
91
|
-
| {
|
|
92
|
-
Transfer: {
|
|
93
|
-
to: AccountIdentifier;
|
|
94
|
-
fee: Tokens;
|
|
95
|
-
from: AccountIdentifier;
|
|
96
|
-
amount: Tokens;
|
|
97
|
-
};
|
|
98
|
-
}
|
|
99
|
-
| {
|
|
100
|
-
TransferFrom: {
|
|
101
|
-
to: AccountIdentifier;
|
|
102
|
-
fee: Tokens;
|
|
103
|
-
from: AccountIdentifier;
|
|
104
|
-
amount: Tokens;
|
|
105
|
-
spender: AccountIdentifier;
|
|
106
|
-
};
|
|
107
|
-
};
|
|
108
|
-
export type QueryArchiveError =
|
|
109
|
-
| {
|
|
110
|
-
BadFirstBlockIndex: {
|
|
111
|
-
requested_index: BlockIndex;
|
|
112
|
-
first_valid_index: BlockIndex;
|
|
113
|
-
};
|
|
114
|
-
}
|
|
115
|
-
| { Other: { error_message: string; error_code: bigint } };
|
|
116
|
-
export type QueryArchiveFn = ActorMethod<[GetBlocksArgs], QueryArchiveResult>;
|
|
117
|
-
export type QueryArchiveResult =
|
|
118
|
-
| { Ok: BlockRange }
|
|
119
|
-
| { Err: QueryArchiveError };
|
|
120
|
-
export interface QueryBlocksResponse {
|
|
121
|
-
certificate: [] | [Uint8Array];
|
|
122
|
-
blocks: Array<Block>;
|
|
123
|
-
chain_length: bigint;
|
|
124
|
-
first_block_index: BlockIndex;
|
|
125
|
-
archived_blocks: Array<{
|
|
126
|
-
callback: QueryArchiveFn;
|
|
127
|
-
start: BlockIndex;
|
|
128
|
-
length: bigint;
|
|
129
|
-
}>;
|
|
130
|
-
}
|
|
131
|
-
export interface SendArgs {
|
|
132
|
-
to: TextAccountIdentifier;
|
|
133
|
-
fee: Tokens;
|
|
134
|
-
memo: Memo;
|
|
135
|
-
from_subaccount: [] | [SubAccount];
|
|
136
|
-
created_at_time: [] | [TimeStamp];
|
|
137
|
-
amount: Tokens;
|
|
138
|
-
}
|
|
139
|
-
export type SubAccount = Uint8Array;
|
|
140
|
-
export type TextAccountIdentifier = string;
|
|
141
|
-
export interface TimeStamp {
|
|
142
|
-
timestamp_nanos: bigint;
|
|
143
|
-
}
|
|
144
|
-
export interface Tokens {
|
|
145
|
-
e8s: bigint;
|
|
146
|
-
}
|
|
147
|
-
export interface Transaction {
|
|
148
|
-
memo: Memo;
|
|
149
|
-
icrc1_memo: [] | [Uint8Array];
|
|
150
|
-
operation: [] | [Operation];
|
|
151
|
-
created_at_time: TimeStamp;
|
|
152
|
-
}
|
|
153
|
-
export interface TransferArg {
|
|
154
|
-
to: Account;
|
|
155
|
-
fee: [] | [Icrc1Tokens];
|
|
156
|
-
memo: [] | [Uint8Array];
|
|
157
|
-
from_subaccount: [] | [SubAccount];
|
|
158
|
-
created_at_time: [] | [Icrc1Timestamp];
|
|
159
|
-
amount: Icrc1Tokens;
|
|
160
|
-
}
|
|
161
|
-
export interface TransferArgs {
|
|
162
|
-
to: AccountIdentifier;
|
|
163
|
-
fee: Tokens;
|
|
164
|
-
memo: Memo;
|
|
165
|
-
from_subaccount: [] | [SubAccount];
|
|
166
|
-
created_at_time: [] | [TimeStamp];
|
|
167
|
-
amount: Tokens;
|
|
168
|
-
}
|
|
169
|
-
export type TransferError =
|
|
170
|
-
| {
|
|
171
|
-
TxTooOld: { allowed_window_nanos: bigint };
|
|
172
|
-
}
|
|
173
|
-
| { BadFee: { expected_fee: Tokens } }
|
|
174
|
-
| { TxDuplicate: { duplicate_of: BlockIndex } }
|
|
175
|
-
| { TxCreatedInFuture: null }
|
|
176
|
-
| { InsufficientFunds: { balance: Tokens } };
|
|
177
|
-
export interface TransferFee {
|
|
178
|
-
transfer_fee: Tokens;
|
|
179
|
-
}
|
|
180
|
-
export type TransferFeeArg = {};
|
|
181
|
-
export type TransferResult = { Ok: BlockIndex } | { Err: TransferError };
|
|
182
|
-
export interface UpgradeArgs {
|
|
183
|
-
maximum_number_of_accounts: [] | [bigint];
|
|
184
|
-
icrc1_minting_account: [] | [Account];
|
|
185
|
-
}
|
|
186
|
-
export type Value =
|
|
187
|
-
| { Int: bigint }
|
|
188
|
-
| { Nat: bigint }
|
|
189
|
-
| { Blob: Uint8Array }
|
|
190
|
-
| { Text: string };
|
|
191
|
-
export interface _SERVICE {
|
|
192
|
-
account_balance: ActorMethod<[AccountBalanceArgs], Tokens>;
|
|
193
|
-
account_balance_dfx: ActorMethod<[AccountBalanceArgsDfx], Tokens>;
|
|
194
|
-
archives: ActorMethod<[], Archives>;
|
|
195
|
-
decimals: ActorMethod<[], { decimals: number }>;
|
|
196
|
-
icrc1_balance_of: ActorMethod<[Account], Icrc1Tokens>;
|
|
197
|
-
icrc1_decimals: ActorMethod<[], number>;
|
|
198
|
-
icrc1_fee: ActorMethod<[], Icrc1Tokens>;
|
|
199
|
-
icrc1_metadata: ActorMethod<[], Array<[string, Value]>>;
|
|
200
|
-
icrc1_minting_account: ActorMethod<[], [] | [Account]>;
|
|
201
|
-
icrc1_name: ActorMethod<[], string>;
|
|
202
|
-
icrc1_supported_standards: ActorMethod<
|
|
203
|
-
[],
|
|
204
|
-
Array<{ url: string; name: string }>
|
|
205
|
-
>;
|
|
206
|
-
icrc1_symbol: ActorMethod<[], string>;
|
|
207
|
-
icrc1_total_supply: ActorMethod<[], Icrc1Tokens>;
|
|
208
|
-
icrc1_transfer: ActorMethod<[TransferArg], Icrc1TransferResult>;
|
|
209
|
-
name: ActorMethod<[], { name: string }>;
|
|
210
|
-
query_blocks: ActorMethod<[GetBlocksArgs], QueryBlocksResponse>;
|
|
211
|
-
send_dfx: ActorMethod<[SendArgs], BlockIndex>;
|
|
212
|
-
symbol: ActorMethod<[], { symbol: string }>;
|
|
213
|
-
transfer: ActorMethod<[TransferArgs], TransferResult>;
|
|
214
|
-
transfer_fee: ActorMethod<[TransferFeeArg], TransferFee>;
|
|
215
|
-
}
|