@dfinity/nns 0.4.3 → 0.5.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/candid/ledger.certified.idl.d.ts +2 -0
- package/dist/candid/ledger.certified.idl.js +97 -0
- package/dist/candid/ledger.did +250 -0
- package/dist/candid/ledger.idl.d.ts +5 -0
- package/dist/candid/ledger.idl.js +109 -0
- package/dist/candid/ledgerTypes.d.ts +111 -0
- package/dist/cjs/index.cjs.js +33 -33
- package/dist/cjs/index.cjs.js.map +3 -3
- package/dist/esm/account_identifier.js +1 -1
- package/dist/esm/chunk-BDJ6FQPO.js +2 -0
- package/dist/esm/chunk-BDJ6FQPO.js.map +7 -0
- package/dist/esm/chunk-C2ZTAHQL.js +3 -0
- package/dist/esm/chunk-C2ZTAHQL.js.map +7 -0
- package/dist/esm/{chunk-FZYDRSYR.js → chunk-CVYDMRZA.js} +5 -5
- package/dist/esm/{chunk-FZYDRSYR.js.map → chunk-CVYDMRZA.js.map} +3 -3
- package/dist/esm/{chunk-BVNLDI2R.js → chunk-EDMSX7GK.js} +2 -2
- package/dist/esm/{chunk-BVNLDI2R.js.map → chunk-EDMSX7GK.js.map} +0 -0
- package/dist/esm/{chunk-BCUFAIRO.js → chunk-S37GZOMR.js} +2 -2
- package/dist/esm/{chunk-BCUFAIRO.js.map → chunk-S37GZOMR.js.map} +0 -0
- package/dist/esm/{chunk-Z667VRMY.js → chunk-SOPGOKKH.js} +2 -2
- package/dist/esm/{chunk-Z667VRMY.js.map → chunk-SOPGOKKH.js.map} +0 -0
- package/dist/esm/genesis_token.js +1 -1
- package/dist/esm/governance.js +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/ledger.js +1 -1
- package/dist/types/account_identifier.d.ts +1 -0
- package/dist/types/canisters/governance/request.proto.converters.d.ts +2 -1
- package/dist/types/canisters/ledger/ledger.request.converts.d.ts +4 -1
- package/dist/types/errors/ledger.errors.d.ts +8 -2
- package/dist/types/governance.d.ts +2 -2
- package/dist/types/ledger.d.ts +13 -8
- package/dist/types/types/governance_converters.d.ts +1 -3
- package/dist/types/types/ledger.d.ts +4 -0
- package/dist/types/types/ledger_converters.d.ts +10 -0
- package/dist/types/utils/converter.utils.d.ts +0 -1
- package/package.json +1 -1
- package/dist/candid/payloads.did +0 -307
- package/dist/candid/payloads.idl.d.ts +0 -53
- package/dist/candid/payloads.idl.js +0 -288
- package/dist/esm/chunk-PTMKC5FF.js +0 -2
- package/dist/esm/chunk-PTMKC5FF.js.map +0 -7
- package/dist/esm/chunk-QNJXXPDD.js +0 -2
- package/dist/esm/chunk-QNJXXPDD.js.map +0 -7
- package/dist/esm/chunk-XMQ7XZ3Q.js +0 -3
- package/dist/esm/chunk-XMQ7XZ3Q.js.map +0 -7
- package/dist/types/canisters/governance/payloads.d.ts +0 -3
|
@@ -821,11 +821,11 @@ ic-request`);var Me=class{getPrincipal(){return _.anonymous()}async transformReq
|
|
|
821
821
|
`)}case XA.Done:throw new Error(`Call was marked as done but we never saw the reply:
|
|
822
822
|
Request ID: ${HA(e)}
|
|
823
823
|
`)}throw new Error("unreachable")}var Rt=class extends JA{constructor(A,e,r,i){super(["Call failed:",` Canister: ${A.toText()}`,` Method: ${e} (${r})`,...Object.getOwnPropertyNames(i).map(B=>` "${B}": ${JSON.stringify(i[B])}`)].join(`
|
|
824
|
-
`)),this.canisterId=A,this.methodName=e,this.type=r,this.props=i}},xr=class extends Rt{constructor(A,e,r){var i;super(A,e,"query",{Status:r.status,Code:(i=Bt[r.reject_code])!==null&&i!==void 0?i:`Unknown Code "${r.reject_code}"`,Message:r.reject_message}),this.result=r}},Sr=class extends Rt{constructor(A,e,r,i){super(A,e,"update",{"Request ID":HA(r),"HTTP status code":i.status.toString(),"HTTP status text":i.statusText}),this.requestId=r,this.response=i}},Dr;(function(t){t.Install="install",t.Reinstall="reinstall",t.Upgrade="upgrade"})(Dr||(Dr={}));var RA=Symbol.for("ic-agent-metadata"),Ce=class{constructor(A){this[RA]=Object.freeze(A)}static agentOf(A){return A[RA].config.agent}static interfaceOf(A){return A[RA].service}static canisterIdOf(A){return _.from(A[RA].config.canisterId)}static async install(A,e){let r=A.mode===void 0?Dr.Install:A.mode,i=A.arg?[...new Uint8Array(A.arg)]:[],B=[...new Uint8Array(A.module)],s=typeof e.canisterId=="string"?_.fromText(e.canisterId):e.canisterId;await Gr(e).install_code({mode:{[r]:null},arg:i,wasm_module:B,canister_id:s})}static async createCanister(A){let{canister_id:e}=await Gr(A||{}).provisional_create_canister_with_cycles({amount:[],settings:[]});return e}static async createAndInstallCanister(A,e,r){let i=await this.createCanister(r);return await this.install(Object.assign({},e),Object.assign(Object.assign({},r),{canisterId:i})),this.createActor(A,Object.assign(Object.assign({},r),{canisterId:i}))}static createActorClass(A){let e=A({IDL:oe});class r extends Ce{constructor(B){let s=typeof B.canisterId=="string"?_.fromText(B.canisterId):B.canisterId;super({config:Object.assign(Object.assign(Object.assign({},Jn),B),{canisterId:s}),service:e});for(let[w,f]of e._fields)this[w]=zs(this,w,f)}}return r}static createActor(A,e){return new(this.createActorClass(A))(e)}};function Yn(t,A){let e=oe.decode(t,Rn.Buffer.from(A));switch(e.length){case 0:return;case 1:return e[0];default:return e}}var Jn={pollingStrategyFactory:it.defaultStrategy};function zs(t,A,e){let r;e.annotations.includes("query")?r=async(B,...s)=>{var w,f;B=Object.assign(Object.assign({},B),(f=(w=t[RA].config).queryTransform)===null||f===void 0?void 0:f.call(w,A,s,Object.assign(Object.assign({},t[RA].config),B)));let y=B.agent||t[RA].config.agent||et(),b=_.from(B.canisterId||t[RA].config.canisterId),x=oe.encode(e.argTypes,s),R=await y.query(b,{methodName:A,arg:x});switch(R.status){case"rejected":throw new xr(b,A,R);case"replied":return Yn(e.retTypes,R.reply.arg)}}:r=async(B,...s)=>{var w,f;B=Object.assign(Object.assign({},B),(f=(w=t[RA].config).callTransform)===null||f===void 0?void 0:f.call(w,A,s,Object.assign(Object.assign({},t[RA].config),B)));let y=B.agent||t[RA].config.agent||et(),{canisterId:b,effectiveCanisterId:x,pollingStrategyFactory:R}=Object.assign(Object.assign(Object.assign({},Jn),t[RA].config),B),F=_.from(b),H=x!==void 0?_.from(x):F,P=oe.encode(e.argTypes,s),{requestId:BA,response:Y}=await y.call(F,{methodName:A,arg:P,effectiveCanisterId:H});if(!Y.ok)throw new Sr(F,A,BA,Y);let sA=R(),uA=await Yt(y,H,BA,sA);if(uA!==void 0)return Yn(e.retTypes,uA);if(e.retTypes.length===0)return;throw new Error(`Call was returned undefined, but type [${e.retTypes.join(",")}].`)};let i=(...B)=>r({},...B);return i.withOptions=B=>(...s)=>r(B,...s),i}var Fg=_.fromText("rrkah-fqaaa-aaaaa-aaaaq-cai"),xg=_.fromText("rrkah-fqaaa-aaaaa-aaaaq-cai"),Sg=_.fromText("ryjl3-tyaaa-aaaaa-aaaba-cai"),Dg=_.fromText("renrk-eyaaa-aaaaa-aaada-cai");var Mg=()=>new Je({host:"https://ic0.app",identity:new Me});export{_ as a,
|
|
824
|
+
`)),this.canisterId=A,this.methodName=e,this.type=r,this.props=i}},xr=class extends Rt{constructor(A,e,r){var i;super(A,e,"query",{Status:r.status,Code:(i=Bt[r.reject_code])!==null&&i!==void 0?i:`Unknown Code "${r.reject_code}"`,Message:r.reject_message}),this.result=r}},Sr=class extends Rt{constructor(A,e,r,i){super(A,e,"update",{"Request ID":HA(r),"HTTP status code":i.status.toString(),"HTTP status text":i.statusText}),this.requestId=r,this.response=i}},Dr;(function(t){t.Install="install",t.Reinstall="reinstall",t.Upgrade="upgrade"})(Dr||(Dr={}));var RA=Symbol.for("ic-agent-metadata"),Ce=class{constructor(A){this[RA]=Object.freeze(A)}static agentOf(A){return A[RA].config.agent}static interfaceOf(A){return A[RA].service}static canisterIdOf(A){return _.from(A[RA].config.canisterId)}static async install(A,e){let r=A.mode===void 0?Dr.Install:A.mode,i=A.arg?[...new Uint8Array(A.arg)]:[],B=[...new Uint8Array(A.module)],s=typeof e.canisterId=="string"?_.fromText(e.canisterId):e.canisterId;await Gr(e).install_code({mode:{[r]:null},arg:i,wasm_module:B,canister_id:s})}static async createCanister(A){let{canister_id:e}=await Gr(A||{}).provisional_create_canister_with_cycles({amount:[],settings:[]});return e}static async createAndInstallCanister(A,e,r){let i=await this.createCanister(r);return await this.install(Object.assign({},e),Object.assign(Object.assign({},r),{canisterId:i})),this.createActor(A,Object.assign(Object.assign({},r),{canisterId:i}))}static createActorClass(A){let e=A({IDL:oe});class r extends Ce{constructor(B){let s=typeof B.canisterId=="string"?_.fromText(B.canisterId):B.canisterId;super({config:Object.assign(Object.assign(Object.assign({},Jn),B),{canisterId:s}),service:e});for(let[w,f]of e._fields)this[w]=zs(this,w,f)}}return r}static createActor(A,e){return new(this.createActorClass(A))(e)}};function Yn(t,A){let e=oe.decode(t,Rn.Buffer.from(A));switch(e.length){case 0:return;case 1:return e[0];default:return e}}var Jn={pollingStrategyFactory:it.defaultStrategy};function zs(t,A,e){let r;e.annotations.includes("query")?r=async(B,...s)=>{var w,f;B=Object.assign(Object.assign({},B),(f=(w=t[RA].config).queryTransform)===null||f===void 0?void 0:f.call(w,A,s,Object.assign(Object.assign({},t[RA].config),B)));let y=B.agent||t[RA].config.agent||et(),b=_.from(B.canisterId||t[RA].config.canisterId),x=oe.encode(e.argTypes,s),R=await y.query(b,{methodName:A,arg:x});switch(R.status){case"rejected":throw new xr(b,A,R);case"replied":return Yn(e.retTypes,R.reply.arg)}}:r=async(B,...s)=>{var w,f;B=Object.assign(Object.assign({},B),(f=(w=t[RA].config).callTransform)===null||f===void 0?void 0:f.call(w,A,s,Object.assign(Object.assign({},t[RA].config),B)));let y=B.agent||t[RA].config.agent||et(),{canisterId:b,effectiveCanisterId:x,pollingStrategyFactory:R}=Object.assign(Object.assign(Object.assign({},Jn),t[RA].config),B),F=_.from(b),H=x!==void 0?_.from(x):F,P=oe.encode(e.argTypes,s),{requestId:BA,response:Y}=await y.call(F,{methodName:A,arg:P,effectiveCanisterId:H});if(!Y.ok)throw new Sr(F,A,BA,Y);let sA=R(),uA=await Yt(y,H,BA,sA);if(uA!==void 0)return Yn(e.retTypes,uA);if(e.retTypes.length===0)return;throw new Error(`Call was returned undefined, but type [${e.retTypes.join(",")}].`)};let i=(...B)=>r({},...B);return i.withOptions=B=>(...s)=>r(B,...s),i}var Fg=_.fromText("rrkah-fqaaa-aaaaa-aaaaq-cai"),xg=_.fromText("rrkah-fqaaa-aaaaa-aaaaq-cai"),Sg=_.fromText("ryjl3-tyaaa-aaaaa-aaaba-cai"),Dg=_.fromText("renrk-eyaaa-aaaaa-aaada-cai");var Mg=()=>new Je({host:"https://ic0.app",identity:new Me});export{_ as a,Hn as b,Ce as c,Fg as d,xg as e,Sg as f,Dg as g,Mg as h};
|
|
825
825
|
/*!
|
|
826
826
|
* The buffer module from node.js, for the browser.
|
|
827
827
|
*
|
|
828
828
|
* @author Feross Aboukhadijeh <https://feross.org>
|
|
829
829
|
* @license MIT
|
|
830
830
|
*/
|
|
831
|
-
//# sourceMappingURL=chunk-
|
|
831
|
+
//# sourceMappingURL=chunk-EDMSX7GK.js.map
|
|
File without changes
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{b as n}from"./chunk-EDMSX7GK.js";var u=async({agent:s,canisterId:t,methodName:r,arg:a})=>{let e=await s.call(t,{methodName:r,arg:a,effectiveCanisterId:t});if(!e.response.ok)throw new Error(["Call failed:",` Method: ${r}`,` Canister ID: ${t}`,` Request ID: ${e.requestId}`,` HTTP status code: ${e.response.status}`,` HTTP status text: ${e.response.statusText}`].join(`
|
|
2
2
|
`));let o=await n.pollForResponse(s,t,e.requestId,n.defaultStrategy());return new Uint8Array(o)},p=async({agent:s,canisterId:t,methodName:r,arg:a})=>{let e=await s.query(t,{methodName:r,arg:a});if(e.status=="rejected")throw new Error(["Call failed:",` Method: ${r}`,` Canister ID: ${t}`,` HTTP status code: ${e.reject_code}`,` HTTP status text: ${e.reject_message}`].join(`
|
|
3
3
|
`));return new Uint8Array(e.reply.arg)};export{u as a,p as b};
|
|
4
|
-
//# sourceMappingURL=chunk-
|
|
4
|
+
//# sourceMappingURL=chunk-S37GZOMR.js.map
|
|
File without changes
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{c as i,g as a,h as s}from"./chunk-EDMSX7GK.js";var u=({IDL:e})=>{let r=e.Record({id:e.Nat64}),t=e.Variant({Ok:e.Vec(r),Err:e.Text}),n=e.Variant({Ok:e.Null,Err:e.Text}),c=e.Record({error:e.Opt(e.Text),timestamp_seconds:e.Nat64,neuron_id:e.Opt(r)}),d=e.Record({authenticated_principal_id:e.Opt(e.Principal),successfully_transferred_neurons:e.Vec(c),is_whitelisted_for_forwarding:e.Bool,has_donated:e.Bool,failed_transferred_neurons:e.Vec(c),neuron_ids:e.Vec(r),has_claimed:e.Bool,has_forwarded:e.Bool,icpts:e.Nat32}),l=e.Variant({Ok:d,Err:e.Text});return e.Service({balance:e.Func([e.Text],[e.Nat32],["query"]),claim_neurons:e.Func([e.Text],[t],[]),donate_account:e.Func([e.Text],[n],[]),forward_whitelisted_unclaimed_accounts:e.Func([e.Null],[n],[]),get_account:e.Func([e.Text],[l],["query"]),len:e.Func([],[e.Nat16],["query"]),total:e.Func([],[e.Nat32],["query"])})};var o=class{constructor(r){this.service=r}static create(r={}){let t=r.agent??s(),n=r.canisterId??a,c=r.serviceOverride??i.createActor(u,{agent:t,canisterId:n});return new o(c)}claimNeurons=async({hexPubKey:r})=>{let t=await this.service.claim_neurons(r);if("Ok"in t)return t.Ok.map(n=>n.id);throw new Error(t.Err)}};export{o as a};
|
|
2
|
+
//# sourceMappingURL=chunk-SOPGOKKH.js.map
|
|
File without changes
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a}from"./chunk-
|
|
1
|
+
import{a}from"./chunk-SOPGOKKH.js";import"./chunk-EDMSX7GK.js";import"./chunk-KXYKDST6.js";import"./chunk-ONAVPXOT.js";export{a as GenesisTokenCanister};
|
|
2
2
|
//# sourceMappingURL=genesis_token.js.map
|
package/dist/esm/governance.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{s as a}from"./chunk-
|
|
1
|
+
import{s as a}from"./chunk-CVYDMRZA.js";import"./chunk-C2ZTAHQL.js";import"./chunk-S37GZOMR.js";import"./chunk-EDMSX7GK.js";import"./chunk-KXYKDST6.js";import"./chunk-MTPVFXPH.js";import"./chunk-FL7E4DL3.js";import"./chunk-ONAVPXOT.js";export{a as GovernanceCanister};
|
|
2
2
|
//# sourceMappingURL=governance.js.map
|
package/dist/esm/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as i}from"./chunk-
|
|
1
|
+
import{a as i}from"./chunk-SOPGOKKH.js";import{a as N,b as P,c as b,d as v,e as B,f as C,g as S,h as g,i as T,j as y,k as A,l as G,m as V,n as h,o as k,p as F,q as L,r as j,s as c}from"./chunk-CVYDMRZA.js";import{g as a,h as d}from"./chunk-C2ZTAHQL.js";import{a as q,b as w,c as z,d as D,e as E,f as H,g as J,h as K,i as M,j as m}from"./chunk-BDJ6FQPO.js";import"./chunk-S37GZOMR.js";import"./chunk-EDMSX7GK.js";import"./chunk-KXYKDST6.js";import{c as _,d as I}from"./chunk-MTPVFXPH.js";import"./chunk-FL7E4DL3.js";import"./chunk-ONAVPXOT.js";var l=({recentBallots:e,proposalId:o})=>o?e.find(({proposalId:n})=>n===o)?.vote:void 0,x=({neurons:e,proposal:o})=>{let{ballots:r,proposalTimestampSeconds:n}=o;return e.filter(({createdTimestampSeconds:t,neuronId:f})=>{let p=t>n,s=r.find(({neuronId:u})=>u===f)===void 0;return p||s})},O=({neurons:e,proposal:o})=>{let{id:r}=o;return e.filter(({recentBallots:n,neuronId:t})=>l({recentBallots:n,proposalId:r})===void 0&&x({neurons:e,proposal:o}).find(({neuronId:f})=>f===t)===void 0)},Q=({neurons:e,proposal:o})=>{let{id:r}=o;return e.filter(({recentBallots:n})=>l({recentBallots:n,proposalId:r})!==void 0)};export{a as AccountIdentifier,J as BadFeeError,P as CouldNotClaimNeuronError,T as FeatureNotSupportedError,_ as FromICPStringError,i as GenesisTokenCanister,c as GovernanceCanister,B as GovernanceError,I as ICP,b as InsufficientAmountError,z as InsufficientFundsError,S as InvalidAccountIDError,C as InvalidPercentageError,w as InvalidSenderError,m as LedgerCanister,V as NeuronState,h as ProposalRewardStatus,k as ProposalStatus,N as StakeNeuronError,d as SubAccount,L as Topic,q as TransferError,E as TxCreatedInFutureError,H as TxDuplicateError,D as TxTooOldError,v as UnrecognizedTypeError,g as UnsupportedValueError,F as Vote,A as accountIdentifierFromBytes,y as accountIdentifierToBytes,j as checkAccountId,x as ineligibleNeurons,K as mapTransferError,M as mapTransferProtoError,G as principalToAccountIdentifier,O as votableNeurons,Q 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 {\n Ballot,\n BallotInfo,\n NeuronInfo,\n ProposalId,\n ProposalInfo,\n Vote,\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\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 * Neurons that can vote for the proposal (not voted, with voting power)\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\nexport const votedNeurons = ({\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 }: NeuronInfo) =>\n voteForProposal({ recentBallots, proposalId }) !== undefined\n );\n};\n"],
|
|
5
|
-
"mappings": "
|
|
5
|
+
"mappings": "+hBASA,GAAM,GAAkB,CAAC,CACvB,gBACA,gBAKK,EAOE,AAHgC,EAAc,KACnD,CAAC,CAAE,WAAY,KAAqB,IAAO,CAC7C,GACe,KANb,OASS,EAAoB,CAAC,CAChC,UACA,cAIkB,CAClB,GAAM,CAAE,UAAS,4BAA6B,EAE9C,MAAO,GAAQ,OAAO,CAAC,CAAE,0BAAyB,cAA2B,CAC3E,GAAM,GACJ,EAA0B,EAEtB,EACJ,EAAQ,KACN,CAAC,CAAE,SAAU,KAA6B,IAAmB,CAC/D,IAAM,OAER,MAAO,IAAwB,CACjC,CAAC,CACH,EAKa,EAAiB,CAAC,CAC7B,UACA,cAIkB,CAClB,GAAM,CAAE,GAAI,GAAe,EAE3B,MAAO,GAAQ,OACb,CAAC,CAAE,gBAAe,cAChB,EAAgB,CAAE,gBAAe,YAAW,CAAC,IAAM,QACnD,EAAkB,CAAE,UAAS,UAAS,CAAC,EAAE,KACvC,CAAC,CAAE,SAAU,KACX,IAAuB,CAC3B,IAAM,MACV,CACF,EAEa,EAAe,CAAC,CAC3B,UACA,cAIkB,CAClB,GAAM,CAAE,GAAI,GAAe,EAE3B,MAAO,GAAQ,OACb,CAAC,CAAE,mBACD,EAAgB,CAAE,gBAAe,YAAW,CAAC,IAAM,MACvD,CACF",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/dist/esm/ledger.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{j as a}from"./chunk-BDJ6FQPO.js";import"./chunk-S37GZOMR.js";import"./chunk-EDMSX7GK.js";import"./chunk-KXYKDST6.js";import"./chunk-MTPVFXPH.js";import"./chunk-FL7E4DL3.js";import"./chunk-ONAVPXOT.js";export{a as LedgerCanister};
|
|
2
2
|
//# sourceMappingURL=ledger.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ManageNeuron as PbManageNeuron } from "../../../proto/governance_pb";
|
|
2
2
|
import { NeuronId } from "../../types/common";
|
|
3
|
-
import { AddHotKeyRequest, DisburseRequest, MergeMaturityRequest, MergeRequest, RemoveHotKeyRequest, SpawnRequest } from "../../types/governance_converters";
|
|
3
|
+
import { AddHotKeyRequest, DisburseRequest, FollowRequest, MergeMaturityRequest, MergeRequest, RemoveHotKeyRequest, SpawnRequest } from "../../types/governance_converters";
|
|
4
4
|
export declare const fromAddHotKeyRequest: (request: AddHotKeyRequest) => PbManageNeuron;
|
|
5
5
|
export declare const fromRemoveHotKeyRequest: (request: RemoveHotKeyRequest) => PbManageNeuron;
|
|
6
6
|
export declare const fromIncreaseDissolveDelayRequest: ({ neuronId, additionalDissolveDelaySeconds, }: {
|
|
@@ -13,3 +13,4 @@ export declare const fromDisburseRequest: (request: DisburseRequest) => PbManage
|
|
|
13
13
|
export declare const fromMergeMaturityRequest: (request: MergeMaturityRequest) => PbManageNeuron;
|
|
14
14
|
export declare const fromSpawnRequest: (request: SpawnRequest) => PbManageNeuron;
|
|
15
15
|
export declare const fromMergeRequest: (request: MergeRequest) => PbManageNeuron;
|
|
16
|
+
export declare const fromFollowRequest: (request: FollowRequest) => PbManageNeuron;
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
import { TransferArgs as TransferRawRequest } from "../../../candid/ledgerTypes";
|
|
1
2
|
import { ICPTs, Subaccount } from "../../../proto/ledger_pb";
|
|
2
|
-
|
|
3
|
+
import { TransferRequest } from "../../types/ledger_converters";
|
|
4
|
+
export declare const subAccountNumbersToSubaccount: (subAccountNumbers: number[]) => Subaccount;
|
|
3
5
|
export declare const toICPTs: (amount: bigint) => ICPTs;
|
|
6
|
+
export declare const toTransferRawRequest: ({ to, amount, memo, fee, fromSubAccount, }: TransferRequest) => TransferRawRequest;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
import { TransferError as RawTransferError } from "../../candid/ledgerTypes";
|
|
1
2
|
import { ICP } from "../icp";
|
|
2
3
|
import { BlockHeight } from "../types/common";
|
|
3
|
-
export declare
|
|
4
|
+
export declare class TransferError extends Error {
|
|
4
5
|
}
|
|
5
6
|
export declare class InvalidSenderError extends TransferError {
|
|
6
7
|
}
|
|
@@ -18,4 +19,9 @@ export declare class TxDuplicateError extends TransferError {
|
|
|
18
19
|
readonly duplicateOf: BlockHeight;
|
|
19
20
|
constructor(duplicateOf: BlockHeight);
|
|
20
21
|
}
|
|
21
|
-
export declare
|
|
22
|
+
export declare class BadFeeError extends TransferError {
|
|
23
|
+
readonly expectedFee: bigint;
|
|
24
|
+
constructor(expectedFee: bigint);
|
|
25
|
+
}
|
|
26
|
+
export declare const mapTransferError: (rawTransferError: RawTransferError) => TransferError;
|
|
27
|
+
export declare const mapTransferProtoError: (responseBytes: Error) => TransferError;
|
|
@@ -50,10 +50,10 @@ export declare class GovernanceCanister {
|
|
|
50
50
|
* @throws {@link CouldNotClaimNeuronError}
|
|
51
51
|
* @throws {@link TransferError}
|
|
52
52
|
*/
|
|
53
|
-
stakeNeuron: ({ stake, principal,
|
|
53
|
+
stakeNeuron: ({ stake, principal, fromSubAccount, ledgerCanister, }: {
|
|
54
54
|
stake: ICP;
|
|
55
55
|
principal: Principal;
|
|
56
|
-
|
|
56
|
+
fromSubAccount?: number[] | undefined;
|
|
57
57
|
ledgerCanister: LedgerCanister;
|
|
58
58
|
}) => Promise<NeuronId>;
|
|
59
59
|
/**
|
package/dist/types/ledger.d.ts
CHANGED
|
@@ -1,12 +1,16 @@
|
|
|
1
1
|
import { AccountIdentifier } from "./account_identifier";
|
|
2
2
|
import { ICP } from "./icp";
|
|
3
|
-
import { BlockHeight
|
|
3
|
+
import { BlockHeight } from "./types/common";
|
|
4
4
|
import { LedgerCanisterOptions } from "./types/ledger";
|
|
5
|
+
import { TransferRequest } from "./types/ledger_converters";
|
|
5
6
|
export declare class LedgerCanister {
|
|
6
7
|
private readonly agent;
|
|
7
8
|
private readonly canisterId;
|
|
9
|
+
private readonly service;
|
|
10
|
+
private readonly certifiedService;
|
|
8
11
|
private readonly updateFetcher;
|
|
9
12
|
private readonly queryFetcher;
|
|
13
|
+
private readonly hardwareWallet;
|
|
10
14
|
private constructor();
|
|
11
15
|
static create(options?: LedgerCanisterOptions): LedgerCanister;
|
|
12
16
|
/**
|
|
@@ -21,17 +25,18 @@ export declare class LedgerCanister {
|
|
|
21
25
|
accountIdentifier: AccountIdentifier;
|
|
22
26
|
certified?: boolean | undefined;
|
|
23
27
|
}) => Promise<ICP>;
|
|
28
|
+
/**
|
|
29
|
+
* Returns the transaction fee of the ledger canister
|
|
30
|
+
* @returns {BigInt}
|
|
31
|
+
*/
|
|
32
|
+
transactionFee: () => Promise<bigint>;
|
|
24
33
|
/**
|
|
25
34
|
* Transfer ICP from the caller to the destination `accountIdentifier`.
|
|
26
35
|
* Returns the index of the block containing the tx if it was successful.
|
|
27
36
|
*
|
|
28
37
|
* @throws {@link TransferError}
|
|
29
38
|
*/
|
|
30
|
-
transfer: (
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
memo?: bigint | undefined;
|
|
34
|
-
fee?: bigint | undefined;
|
|
35
|
-
fromSubAccountId?: number | undefined;
|
|
36
|
-
}) => Promise<BlockHeight>;
|
|
39
|
+
transfer: (request: TransferRequest) => Promise<BlockHeight>;
|
|
40
|
+
private accountBalanceHardwareWallet;
|
|
41
|
+
private transferHardwareWallet;
|
|
37
42
|
}
|
|
@@ -120,9 +120,7 @@ export declare type DissolveState = {
|
|
|
120
120
|
};
|
|
121
121
|
export interface ExecuteNnsFunction {
|
|
122
122
|
nnsFunctionId: number;
|
|
123
|
-
|
|
124
|
-
payload: Option<Record<string, unknown>>;
|
|
125
|
-
payloadBytes: ArrayBuffer;
|
|
123
|
+
payloadBytes?: ArrayBuffer;
|
|
126
124
|
}
|
|
127
125
|
export interface Follow {
|
|
128
126
|
topic: Topic;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Agent } from "@dfinity/agent";
|
|
2
2
|
import { Principal } from "@dfinity/principal";
|
|
3
|
+
import { LedgerService } from "../../candid/ledger.idl";
|
|
3
4
|
export declare type LedgerCanisterCall = (params: {
|
|
4
5
|
agent: Agent;
|
|
5
6
|
canisterId: Principal;
|
|
@@ -9,6 +10,9 @@ export declare type LedgerCanisterCall = (params: {
|
|
|
9
10
|
export interface LedgerCanisterOptions {
|
|
10
11
|
agent?: Agent;
|
|
11
12
|
canisterId?: Principal;
|
|
13
|
+
serviceOverride?: LedgerService;
|
|
14
|
+
certifiedServiceOverride?: LedgerService;
|
|
12
15
|
updateCallOverride?: LedgerCanisterCall;
|
|
13
16
|
queryCallOverride?: LedgerCanisterCall;
|
|
17
|
+
hardwareWallet?: boolean;
|
|
14
18
|
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { AccountIdentifier } from "../account_identifier";
|
|
2
|
+
import { ICP } from "../icp";
|
|
3
|
+
import { E8s } from "./common";
|
|
4
|
+
export declare type TransferRequest = {
|
|
5
|
+
to: AccountIdentifier;
|
|
6
|
+
amount: ICP;
|
|
7
|
+
memo?: bigint;
|
|
8
|
+
fee?: E8s;
|
|
9
|
+
fromSubAccount?: number[];
|
|
10
|
+
};
|
|
@@ -2,7 +2,6 @@ export declare const uint8ArrayToBigInt: (array: Uint8Array) => bigint;
|
|
|
2
2
|
export declare const arrayBufferToArrayOfNumber: (buffer: ArrayBuffer) => Array<number>;
|
|
3
3
|
export declare const arrayOfNumberToUint8Array: (numbers: Array<number>) => Uint8Array;
|
|
4
4
|
export declare const arrayOfNumberToArrayBuffer: (numbers: Array<number>) => ArrayBuffer;
|
|
5
|
-
export declare const numberToArrayBuffer: (value: number, byteLength: number) => ArrayBuffer;
|
|
6
5
|
export declare const asciiStringToByteArray: (text: string) => Array<number>;
|
|
7
6
|
export declare const toHexString: (bytes: Uint8Array) => string;
|
|
8
7
|
export declare const calculateCrc32: (bytes: Uint8Array) => Uint8Array;
|
package/package.json
CHANGED
package/dist/candid/payloads.did
DELETED
|
@@ -1,307 +0,0 @@
|
|
|
1
|
-
// Initially generated by running `cargo run --bin nns_functions_candid_gen`
|
|
2
|
-
// See HOWTO.md / How-To Update `payloads.did` Manually
|
|
3
|
-
|
|
4
|
-
// Exceptions (in rs files but not in did)
|
|
5
|
-
type CanisterAction = variant { Start; Stop };
|
|
6
|
-
type SetAuthorizedSubnetworkListArgs = record {
|
|
7
|
-
who : opt principal;
|
|
8
|
-
subnets : vec principal;
|
|
9
|
-
};
|
|
10
|
-
type StopOrStartNnsCanisterProposalPayload = record {
|
|
11
|
-
action : CanisterAction;
|
|
12
|
-
canister_id : principal;
|
|
13
|
-
};
|
|
14
|
-
type UpdateIcpXdrConversionRatePayload = record {
|
|
15
|
-
data_source : text;
|
|
16
|
-
xdr_permyriad_per_icp : nat64;
|
|
17
|
-
timestamp_seconds : nat64;
|
|
18
|
-
};
|
|
19
|
-
|
|
20
|
-
// Source: ic/master/rs/registry/canister/canister/registry.did
|
|
21
|
-
// Commit: https://github.com/dfinity/ic/commit/3b8c3db8acbb1fa5d3f751a53ee9638264062808
|
|
22
|
-
type AddFirewallRulesPayload = record {
|
|
23
|
-
expected_hash : text;
|
|
24
|
-
scope : FirewallRulesScope;
|
|
25
|
-
positions : vec int32;
|
|
26
|
-
rules : vec FirewallRule;
|
|
27
|
-
};
|
|
28
|
-
type AddNodeOperatorPayload = record {
|
|
29
|
-
ipv6 : opt text;
|
|
30
|
-
node_operator_principal_id : opt principal;
|
|
31
|
-
node_allowance : nat64;
|
|
32
|
-
rewardable_nodes : vec record { text; nat32 };
|
|
33
|
-
node_provider_principal_id : opt principal;
|
|
34
|
-
dc_id : text;
|
|
35
|
-
};
|
|
36
|
-
type AddNodePayload = record {
|
|
37
|
-
prometheus_metrics_endpoint : text;
|
|
38
|
-
http_endpoint : text;
|
|
39
|
-
idkg_dealing_encryption_pk : opt vec nat8;
|
|
40
|
-
xnet_endpoint : text;
|
|
41
|
-
committee_signing_pk : vec nat8;
|
|
42
|
-
node_signing_pk : vec nat8;
|
|
43
|
-
transport_tls_cert : vec nat8;
|
|
44
|
-
ni_dkg_dealing_encryption_pk : vec nat8;
|
|
45
|
-
p2p_flow_endpoints : vec text;
|
|
46
|
-
};
|
|
47
|
-
type AddNodesToSubnetPayload = record {
|
|
48
|
-
subnet_id : principal;
|
|
49
|
-
node_ids : vec principal;
|
|
50
|
-
};
|
|
51
|
-
type AddOrRemoveDataCentersProposalPayload = record {
|
|
52
|
-
data_centers_to_add : vec DataCenterRecord;
|
|
53
|
-
data_centers_to_remove : vec text;
|
|
54
|
-
};
|
|
55
|
-
type BitcoinFeature = record {
|
|
56
|
-
status : BitcoinFeatureStatus;
|
|
57
|
-
network : Network;
|
|
58
|
-
};
|
|
59
|
-
type BitcoinFeatureStatus = variant { Paused; Enabled; Disabled; Syncing };
|
|
60
|
-
type BlessReplicaVersionPayload = record {
|
|
61
|
-
node_manager_sha256_hex : text;
|
|
62
|
-
release_package_url : text;
|
|
63
|
-
sha256_hex : text;
|
|
64
|
-
replica_version_id : text;
|
|
65
|
-
release_package_sha256_hex : text;
|
|
66
|
-
node_manager_binary_url : text;
|
|
67
|
-
binary_url : text;
|
|
68
|
-
};
|
|
69
|
-
type CanisterIdRange = record { end : principal; start : principal };
|
|
70
|
-
type CompleteCanisterMigrationPayload = record {
|
|
71
|
-
canister_id_ranges : vec CanisterIdRange;
|
|
72
|
-
migration_trace : vec principal;
|
|
73
|
-
};
|
|
74
|
-
type CreateSubnetPayload = record {
|
|
75
|
-
unit_delay_millis : nat64;
|
|
76
|
-
max_instructions_per_round : nat64;
|
|
77
|
-
features : SubnetFeatures;
|
|
78
|
-
max_instructions_per_message : nat64;
|
|
79
|
-
gossip_registry_poll_period_ms : nat32;
|
|
80
|
-
max_ingress_bytes_per_message : nat64;
|
|
81
|
-
dkg_dealings_per_block : nat64;
|
|
82
|
-
max_block_payload_size : nat64;
|
|
83
|
-
max_instructions_per_install_code : nat64;
|
|
84
|
-
start_as_nns : bool;
|
|
85
|
-
is_halted : bool;
|
|
86
|
-
gossip_pfn_evaluation_period_ms : nat32;
|
|
87
|
-
max_ingress_messages_per_block : nat64;
|
|
88
|
-
max_number_of_canisters : nat64;
|
|
89
|
-
ecdsa_config : opt EcdsaInitialConfig;
|
|
90
|
-
gossip_max_artifact_streams_per_peer : nat32;
|
|
91
|
-
advert_best_effort_percentage : opt nat32;
|
|
92
|
-
replica_version_id : text;
|
|
93
|
-
gossip_max_duplicity : nat32;
|
|
94
|
-
gossip_max_chunk_wait_ms : nat32;
|
|
95
|
-
dkg_interval_length : nat64;
|
|
96
|
-
subnet_id_override : opt principal;
|
|
97
|
-
ssh_backup_access : vec text;
|
|
98
|
-
ingress_bytes_per_block_soft_cap : nat64;
|
|
99
|
-
initial_notary_delay_millis : nat64;
|
|
100
|
-
gossip_max_chunk_size : nat32;
|
|
101
|
-
subnet_type : SubnetType;
|
|
102
|
-
ssh_readonly_access : vec text;
|
|
103
|
-
gossip_retransmission_request_ms : nat32;
|
|
104
|
-
gossip_receive_check_cache_size : nat32;
|
|
105
|
-
node_ids : vec principal;
|
|
106
|
-
};
|
|
107
|
-
type DataCenterRecord = record {
|
|
108
|
-
id : text;
|
|
109
|
-
gps : opt Gps;
|
|
110
|
-
region : text;
|
|
111
|
-
owner : text;
|
|
112
|
-
};
|
|
113
|
-
type DeleteSubnetPayload = record { subnet_id : opt principal };
|
|
114
|
-
type EcdsaConfig = record {
|
|
115
|
-
quadruples_to_create_in_advance : nat32;
|
|
116
|
-
key_ids : vec EcdsaKeyId;
|
|
117
|
-
};
|
|
118
|
-
type EcdsaCurve = variant { secp256k1 };
|
|
119
|
-
type EcdsaInitialConfig = record {
|
|
120
|
-
quadruples_to_create_in_advance : nat32;
|
|
121
|
-
keys : vec EcdsaKeyRequest;
|
|
122
|
-
};
|
|
123
|
-
type EcdsaKeyId = record { name : text; curve : EcdsaCurve };
|
|
124
|
-
type EcdsaKeyRequest = record {
|
|
125
|
-
key_id : EcdsaKeyId;
|
|
126
|
-
subnet_id : opt principal;
|
|
127
|
-
};
|
|
128
|
-
type FirewallRule = record {
|
|
129
|
-
ipv4_prefixes : vec text;
|
|
130
|
-
action : int32;
|
|
131
|
-
comment : text;
|
|
132
|
-
ipv6_prefixes : vec text;
|
|
133
|
-
ports : vec nat32;
|
|
134
|
-
};
|
|
135
|
-
type FirewallRulesScope = variant {
|
|
136
|
-
Node : principal;
|
|
137
|
-
ReplicaNodes;
|
|
138
|
-
Subnet : principal;
|
|
139
|
-
Global;
|
|
140
|
-
};
|
|
141
|
-
type Gps = record { latitude : float32; longitude : float32 };
|
|
142
|
-
type Network = variant { Mainnet; Testnet };
|
|
143
|
-
type NodeOperatorRecord = record {
|
|
144
|
-
ipv6 : opt text;
|
|
145
|
-
node_operator_principal_id : vec nat8;
|
|
146
|
-
node_allowance : nat64;
|
|
147
|
-
rewardable_nodes : vec record { text; nat32 };
|
|
148
|
-
node_provider_principal_id : vec nat8;
|
|
149
|
-
dc_id : text;
|
|
150
|
-
};
|
|
151
|
-
type NodeProvidersMonthlyXdrRewards = record {
|
|
152
|
-
rewards : vec record { text; nat64 };
|
|
153
|
-
};
|
|
154
|
-
type NodeRewardRate = record { xdr_permyriad_per_node_per_month : nat64 };
|
|
155
|
-
type NodeRewardRates = record { rates : vec record { text; NodeRewardRate } };
|
|
156
|
-
type PrepareCanisterMigrationPayload = record {
|
|
157
|
-
canister_id_ranges : vec CanisterIdRange;
|
|
158
|
-
source_subnet : principal;
|
|
159
|
-
destination_subnet : principal;
|
|
160
|
-
};
|
|
161
|
-
type RecoverSubnetPayload = record {
|
|
162
|
-
height : nat64;
|
|
163
|
-
replacement_nodes : opt vec principal;
|
|
164
|
-
subnet_id : principal;
|
|
165
|
-
registry_store_uri : opt record { text; text; nat64 };
|
|
166
|
-
ecdsa_config : opt EcdsaInitialConfig;
|
|
167
|
-
state_hash : vec nat8;
|
|
168
|
-
time_ns : nat64;
|
|
169
|
-
};
|
|
170
|
-
type RemoveFirewallRulesPayload = record {
|
|
171
|
-
expected_hash : text;
|
|
172
|
-
scope : FirewallRulesScope;
|
|
173
|
-
positions : vec int32;
|
|
174
|
-
};
|
|
175
|
-
type RemoveNodeDirectlyPayload = record { node_id : principal };
|
|
176
|
-
type RemoveNodeOperatorsPayload = record {
|
|
177
|
-
node_operators_to_remove : vec vec nat8;
|
|
178
|
-
};
|
|
179
|
-
type RemoveNodesPayload = record { node_ids : vec principal };
|
|
180
|
-
type RerouteCanisterRangesPayload = record {
|
|
181
|
-
source_subnet : principal;
|
|
182
|
-
reassigned_canister_ranges : vec CanisterIdRange;
|
|
183
|
-
destination_subnet : principal;
|
|
184
|
-
};
|
|
185
|
-
type Result = variant { Ok : principal; Err : text };
|
|
186
|
-
type Result_1 = variant { Ok; Err : text };
|
|
187
|
-
type Result_2 = variant {
|
|
188
|
-
Ok : vec record { DataCenterRecord; NodeOperatorRecord };
|
|
189
|
-
Err : text;
|
|
190
|
-
};
|
|
191
|
-
type Result_3 = variant { Ok : NodeProvidersMonthlyXdrRewards; Err : text };
|
|
192
|
-
type SetFirewallConfigPayload = record {
|
|
193
|
-
ipv4_prefixes : vec text;
|
|
194
|
-
firewall_config : text;
|
|
195
|
-
ipv6_prefixes : vec text;
|
|
196
|
-
};
|
|
197
|
-
type SubnetFeatures = record {
|
|
198
|
-
canister_sandboxing : bool;
|
|
199
|
-
http_requests : bool;
|
|
200
|
-
bitcoin : opt BitcoinFeature;
|
|
201
|
-
ecdsa_signatures : bool;
|
|
202
|
-
};
|
|
203
|
-
type SubnetType = variant { application; verified_application; system };
|
|
204
|
-
type UpdateNodeDirectlyPayload = record {
|
|
205
|
-
idkg_dealing_encryption_pk : opt vec nat8;
|
|
206
|
-
};
|
|
207
|
-
type UpdateNodeOperatorConfigDirectlyPayload = record {
|
|
208
|
-
node_operator_id : opt principal;
|
|
209
|
-
node_provider_id : opt principal;
|
|
210
|
-
};
|
|
211
|
-
type UpdateNodeOperatorConfigPayload = record {
|
|
212
|
-
node_operator_id : opt principal;
|
|
213
|
-
set_ipv6_to_none : opt bool;
|
|
214
|
-
ipv6 : opt text;
|
|
215
|
-
node_provider_id : opt principal;
|
|
216
|
-
node_allowance : opt nat64;
|
|
217
|
-
rewardable_nodes : vec record { text; nat32 };
|
|
218
|
-
dc_id : opt text;
|
|
219
|
-
};
|
|
220
|
-
type UpdateNodeRewardsTableProposalPayload = record {
|
|
221
|
-
new_entries : vec record { text; NodeRewardRates };
|
|
222
|
-
};
|
|
223
|
-
type UpdateSubnetPayload = record {
|
|
224
|
-
unit_delay_millis : opt nat64;
|
|
225
|
-
max_duplicity : opt nat32;
|
|
226
|
-
max_instructions_per_round : opt nat64;
|
|
227
|
-
features : opt SubnetFeatures;
|
|
228
|
-
set_gossip_config_to_default : bool;
|
|
229
|
-
max_instructions_per_message : opt nat64;
|
|
230
|
-
pfn_evaluation_period_ms : opt nat32;
|
|
231
|
-
subnet_id : principal;
|
|
232
|
-
max_ingress_bytes_per_message : opt nat64;
|
|
233
|
-
dkg_dealings_per_block : opt nat64;
|
|
234
|
-
ecdsa_key_signing_disable : opt vec EcdsaKeyId;
|
|
235
|
-
max_block_payload_size : opt nat64;
|
|
236
|
-
max_instructions_per_install_code : opt nat64;
|
|
237
|
-
start_as_nns : opt bool;
|
|
238
|
-
is_halted : opt bool;
|
|
239
|
-
max_ingress_messages_per_block : opt nat64;
|
|
240
|
-
max_number_of_canisters : opt nat64;
|
|
241
|
-
ecdsa_config : opt EcdsaConfig;
|
|
242
|
-
advert_best_effort_percentage : opt nat32;
|
|
243
|
-
retransmission_request_ms : opt nat32;
|
|
244
|
-
dkg_interval_length : opt nat64;
|
|
245
|
-
registry_poll_period_ms : opt nat32;
|
|
246
|
-
max_chunk_wait_ms : opt nat32;
|
|
247
|
-
receive_check_cache_size : opt nat32;
|
|
248
|
-
ecdsa_key_signing_enable : opt vec EcdsaKeyId;
|
|
249
|
-
ssh_backup_access : opt vec text;
|
|
250
|
-
max_chunk_size : opt nat32;
|
|
251
|
-
initial_notary_delay_millis : opt nat64;
|
|
252
|
-
max_artifact_streams_per_peer : opt nat32;
|
|
253
|
-
subnet_type : opt SubnetType;
|
|
254
|
-
ssh_readonly_access : opt vec text;
|
|
255
|
-
};
|
|
256
|
-
type UpdateSubnetReplicaVersionPayload = record {
|
|
257
|
-
subnet_id : principal;
|
|
258
|
-
replica_version_id : text;
|
|
259
|
-
};
|
|
260
|
-
type UpdateUnassignedNodesConfigPayload = record {
|
|
261
|
-
replica_version : opt text;
|
|
262
|
-
ssh_readonly_access : opt vec text;
|
|
263
|
-
};
|
|
264
|
-
service : {
|
|
265
|
-
// EXCEPTIONS (in rs files but not in did)
|
|
266
|
-
set_authorized_subnetwork_list : (SetAuthorizedSubnetworkListArgs) -> ();
|
|
267
|
-
stop_or_start_nns_canister : (StopOrStartNnsCanisterProposalPayload) -> ();
|
|
268
|
-
update_icp_xdr_conversion_rate : (UpdateIcpXdrConversionRatePayload) -> ();
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
// Source: ic/master/rs/registry/canister/canister/registry.did
|
|
272
|
-
// Commit: https://github.com/dfinity/ic/commit/3b8c3db8acbb1fa5d3f751a53ee9638264062808
|
|
273
|
-
add_firewall_rules : (AddFirewallRulesPayload) -> ();
|
|
274
|
-
add_node : (AddNodePayload) -> (Result);
|
|
275
|
-
add_node_operator : (AddNodeOperatorPayload) -> ();
|
|
276
|
-
add_nodes_to_subnet : (AddNodesToSubnetPayload) -> ();
|
|
277
|
-
add_or_remove_data_centers : (AddOrRemoveDataCentersProposalPayload) -> ();
|
|
278
|
-
bless_replica_version : (BlessReplicaVersionPayload) -> ();
|
|
279
|
-
clear_provisional_whitelist : () -> ();
|
|
280
|
-
complete_canister_migration : (CompleteCanisterMigrationPayload) -> (
|
|
281
|
-
Result_1,
|
|
282
|
-
);
|
|
283
|
-
create_subnet : (CreateSubnetPayload) -> ();
|
|
284
|
-
delete_subnet : (DeleteSubnetPayload) -> ();
|
|
285
|
-
get_build_metadata : () -> (text) query;
|
|
286
|
-
get_node_operators_and_dcs_of_node_provider : (principal) -> (Result_2) query;
|
|
287
|
-
get_node_providers_monthly_xdr_rewards : () -> (Result_3) query;
|
|
288
|
-
prepare_canister_migration : (PrepareCanisterMigrationPayload) -> (Result_1);
|
|
289
|
-
recover_subnet : (RecoverSubnetPayload) -> ();
|
|
290
|
-
remove_firewall_rules : (RemoveFirewallRulesPayload) -> ();
|
|
291
|
-
remove_node_directly : (RemoveNodeDirectlyPayload) -> ();
|
|
292
|
-
remove_node_operators : (RemoveNodeOperatorsPayload) -> ();
|
|
293
|
-
remove_nodes : (RemoveNodesPayload) -> ();
|
|
294
|
-
remove_nodes_from_subnet : (RemoveNodesPayload) -> ();
|
|
295
|
-
reroute_canister_ranges : (RerouteCanisterRangesPayload) -> (Result_1);
|
|
296
|
-
set_firewall_config : (SetFirewallConfigPayload) -> ();
|
|
297
|
-
update_firewall_rules : (AddFirewallRulesPayload) -> ();
|
|
298
|
-
update_node_directly : (UpdateNodeDirectlyPayload) -> (Result_1);
|
|
299
|
-
update_node_operator_config : (UpdateNodeOperatorConfigPayload) -> ();
|
|
300
|
-
update_node_operator_config_directly : (
|
|
301
|
-
UpdateNodeOperatorConfigDirectlyPayload,
|
|
302
|
-
) -> ();
|
|
303
|
-
update_node_rewards_table : (UpdateNodeRewardsTableProposalPayload) -> ();
|
|
304
|
-
update_subnet : (UpdateSubnetPayload) -> ();
|
|
305
|
-
update_subnet_replica_version : (UpdateSubnetReplicaVersionPayload) -> ();
|
|
306
|
-
update_unassigned_nodes_config : (UpdateUnassignedNodesConfigPayload) -> ();
|
|
307
|
-
}
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
import type { IDL } from "@dfinity/candid";
|
|
2
|
-
|
|
3
|
-
export const FirewallRulesScope: IDL.RecordClass;
|
|
4
|
-
export const FirewallRule: IDL.RecordClass;
|
|
5
|
-
export const AddFirewallRulesPayload: IDL.RecordClass;
|
|
6
|
-
export const AddNodePayload: IDL.RecordClass;
|
|
7
|
-
export const Result: IDL.RecordClass;
|
|
8
|
-
export const AddNodeOperatorPayload: IDL.RecordClass;
|
|
9
|
-
export const AddNodesToSubnetPayload: IDL.RecordClass;
|
|
10
|
-
export const Gps: IDL.RecordClass;
|
|
11
|
-
export const DataCenterRecord: IDL.RecordClass;
|
|
12
|
-
export const AddOrRemoveDataCentersProposalPayload: IDL.RecordClass;
|
|
13
|
-
export const BlessReplicaVersionPayload: IDL.RecordClass;
|
|
14
|
-
export const CanisterIdRange: IDL.RecordClass;
|
|
15
|
-
export const CompleteCanisterMigrationPayload: IDL.RecordClass;
|
|
16
|
-
export const Result_1: IDL.RecordClass;
|
|
17
|
-
export const BitcoinFeatureStatus: IDL.RecordClass;
|
|
18
|
-
export const Network: IDL.RecordClass;
|
|
19
|
-
export const BitcoinFeature: IDL.RecordClass;
|
|
20
|
-
export const SubnetFeatures: IDL.RecordClass;
|
|
21
|
-
export const EcdsaCurve: IDL.RecordClass;
|
|
22
|
-
export const EcdsaKeyId: IDL.RecordClass;
|
|
23
|
-
export const EcdsaKeyRequest: IDL.RecordClass;
|
|
24
|
-
export const EcdsaInitialConfig: IDL.RecordClass;
|
|
25
|
-
export const SubnetType: IDL.RecordClass;
|
|
26
|
-
export const CreateSubnetPayload: IDL.RecordClass;
|
|
27
|
-
export const DeleteSubnetPayload: IDL.RecordClass;
|
|
28
|
-
export const NodeOperatorRecord: IDL.RecordClass;
|
|
29
|
-
export const Result_2: IDL.RecordClass;
|
|
30
|
-
export const NodeProvidersMonthlyXdrRewards: IDL.RecordClass;
|
|
31
|
-
export const Result_3: IDL.RecordClass;
|
|
32
|
-
export const PrepareCanisterMigrationPayload: IDL.RecordClass;
|
|
33
|
-
export const RecoverSubnetPayload: IDL.RecordClass;
|
|
34
|
-
export const RemoveFirewallRulesPayload: IDL.RecordClass;
|
|
35
|
-
export const RemoveNodeDirectlyPayload: IDL.RecordClass;
|
|
36
|
-
export const RemoveNodeOperatorsPayload: IDL.RecordClass;
|
|
37
|
-
export const RemoveNodesPayload: IDL.RecordClass;
|
|
38
|
-
export const RerouteCanisterRangesPayload: IDL.RecordClass;
|
|
39
|
-
export const SetAuthorizedSubnetworkListArgs: IDL.RecordClass;
|
|
40
|
-
export const SetFirewallConfigPayload: IDL.RecordClass;
|
|
41
|
-
export const CanisterAction: IDL.RecordClass;
|
|
42
|
-
export const StopOrStartNnsCanisterProposalPayload: IDL.RecordClass;
|
|
43
|
-
export const UpdateIcpXdrConversionRatePayload: IDL.RecordClass;
|
|
44
|
-
export const UpdateNodeDirectlyPayload: IDL.RecordClass;
|
|
45
|
-
export const UpdateNodeOperatorConfigPayload: IDL.RecordClass;
|
|
46
|
-
export const UpdateNodeOperatorConfigDirectlyPayload: IDL.RecordClass;
|
|
47
|
-
export const NodeRewardRate: IDL.RecordClass;
|
|
48
|
-
export const NodeRewardRates: IDL.RecordClass;
|
|
49
|
-
export const UpdateNodeRewardsTableProposalPayload: IDL.RecordClass;
|
|
50
|
-
export const EcdsaConfig: IDL.RecordClass;
|
|
51
|
-
export const UpdateSubnetPayload: IDL.RecordClass;
|
|
52
|
-
export const UpdateSubnetReplicaVersionPayload: IDL.RecordClass;
|
|
53
|
-
export const UpdateUnassignedNodesConfigPayload: IDL.RecordClass;
|