@dfinity/nns 0.2.1 → 0.2.2-nightly-2022-02-28

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.
Files changed (36) hide show
  1. package/dist/candid/governance.certified.idl.d.ts +2 -0
  2. package/dist/candid/governance.certified.idl.js +704 -0
  3. package/dist/candid/governance.did +338 -0
  4. package/dist/candid/governance.idl.d.ts +5 -0
  5. package/dist/candid/governance.idl.js +712 -0
  6. package/dist/candid/governanceTypes.d.ts +413 -0
  7. package/dist/candid/payloads.did +168 -0
  8. package/dist/candid/payloads.idl.d.ts +20 -0
  9. package/dist/candid/payloads.idl.js +163 -0
  10. package/dist/cjs/index.cjs.js +32 -32
  11. package/dist/cjs/index.cjs.js.map +2 -2
  12. package/dist/esm/account_identifier.js +1 -1
  13. package/dist/esm/{chunk-NYI672WX.js → chunk-2DZXLOEC.js} +3 -3
  14. package/dist/esm/{chunk-NYI672WX.js.map → chunk-2DZXLOEC.js.map} +2 -2
  15. package/dist/esm/{chunk-SO23SIWX.js → chunk-D2W3ELRE.js} +2 -2
  16. package/dist/esm/{chunk-SO23SIWX.js.map → chunk-D2W3ELRE.js.map} +0 -0
  17. package/dist/esm/{chunk-RPOIUQZO.js → chunk-JCV6KKSG.js} +2 -2
  18. package/dist/esm/{chunk-RPOIUQZO.js.map → chunk-JCV6KKSG.js.map} +2 -2
  19. package/dist/esm/{chunk-X2SHUWG3.js → chunk-QR4654XK.js} +2 -2
  20. package/dist/esm/{chunk-X2SHUWG3.js.map → chunk-QR4654XK.js.map} +0 -0
  21. package/dist/esm/{chunk-YL3F3CIN.js → chunk-S7F2DG6L.js} +2 -2
  22. package/dist/esm/{chunk-YL3F3CIN.js.map → chunk-S7F2DG6L.js.map} +2 -2
  23. package/dist/esm/governance.js +1 -1
  24. package/dist/esm/icp.js +1 -1
  25. package/dist/esm/index.js +1 -1
  26. package/dist/esm/ledger.js +1 -1
  27. package/dist/proto/base_types.proto +60 -0
  28. package/dist/proto/base_types_pb.d.ts +144 -0
  29. package/dist/proto/base_types_pb.js +1071 -0
  30. package/dist/proto/ledger.proto +277 -0
  31. package/dist/proto/ledger_pb.d.ts +911 -0
  32. package/dist/proto/ledger_pb.js +6555 -0
  33. package/dist/types/governance.d.ts +16 -1
  34. package/dist/types/index.d.ts +1 -0
  35. package/dist/types/types/ledger.d.ts +1 -1
  36. package/package.json +3 -3
@@ -1,2 +1,2 @@
1
- import{a as p}from"./chunk-NYI672WX.js";import{c as o,e as c}from"./chunk-4FZAJTYF.js";var I=o(p());var A=(r=>(r[r.FRACTIONAL_MORE_THAN_8_DECIMALS=0]="FRACTIONAL_MORE_THAN_8_DECIMALS",r[r.INVALID_FORMAT=1]="INVALID_FORMAT",r))(A||{});var i=class{constructor(t){this.e8s=t}static fromE8s(t){return new i(t)}static fromString(t){t=t.trim().replace(/[,']/g,"");let r=t.match(/\d*(\.\d*)?/);if(!r||r[0]!==t)return 1;let[s,e]=t.split("."),n=BigInt(0);if(s)try{n+=BigInt(s)*c}catch{return 1}if(e){if(e.length>8)return 0;try{n+=BigInt(e.padEnd(8,"0"))}catch{return 1}}return new i(n)}toE8s(){return this.e8s}toProto(){let t=new I.ICPTs;return t.setE8s(this.e8s.toString()),t}};export{A as a,i as b};
2
- //# sourceMappingURL=chunk-X2SHUWG3.js.map
1
+ import{a as p}from"./chunk-2DZXLOEC.js";import{c as o,e as c}from"./chunk-4FZAJTYF.js";var I=o(p());var A=(r=>(r[r.FRACTIONAL_MORE_THAN_8_DECIMALS=0]="FRACTIONAL_MORE_THAN_8_DECIMALS",r[r.INVALID_FORMAT=1]="INVALID_FORMAT",r))(A||{});var i=class{constructor(t){this.e8s=t}static fromE8s(t){return new i(t)}static fromString(t){t=t.trim().replace(/[,']/g,"");let r=t.match(/\d*(\.\d*)?/);if(!r||r[0]!==t)return 1;let[s,e]=t.split("."),n=BigInt(0);if(s)try{n+=BigInt(s)*c}catch{return 1}if(e){if(e.length>8)return 0;try{n+=BigInt(e.padEnd(8,"0"))}catch{return 1}}return new i(n)}toE8s(){return this.e8s}toProto(){let t=new I.ICPTs;return t.setE8s(this.e8s.toString()),t}};export{A as a,i as b};
2
+ //# sourceMappingURL=chunk-QR4654XK.js.map
@@ -1,4 +1,4 @@
1
- import{c as u,g as I,h as P}from"./chunk-HMU24NWJ.js";import{b as l}from"./chunk-X2SHUWG3.js";import{a as T}from"./chunk-NYI672WX.js";import{c as C}from"./chunk-4FZAJTYF.js";var n=C(T());var p=class{},b=class{},d=class{constructor(e){this.balance=e}},m=class{constructor(e){this.allowed_window_secs=e}},f=class{},g=class{constructor(e){this.duplicateOf=e}};var w=async(i,e,a,c)=>{let r=await i.call(e,{methodName:a,arg:c,effectiveCanisterId:e});if(!r.response.ok)return Error(["Call failed:",` Method: ${a}`,` Canister ID: ${e}`,` Request ID: ${r.requestId}`,` HTTP status code: ${r.response.status}`,` HTTP status text: ${r.response.statusText}`].join(`
1
+ import{c as u,g as I,h as P}from"./chunk-HMU24NWJ.js";import{b as l}from"./chunk-QR4654XK.js";import{a as T}from"./chunk-2DZXLOEC.js";import{c as C}from"./chunk-4FZAJTYF.js";var n=C(T());var p=class{},b=class{},d=class{constructor(e){this.balance=e}},m=class{constructor(e){this.allowed_window_secs=e}},f=class{},g=class{constructor(e){this.duplicateOf=e}};var w=async(i,e,a,c)=>{let r=await i.call(e,{methodName:a,arg:c,effectiveCanisterId:e});if(!r.response.ok)return Error(["Call failed:",` Method: ${a}`,` Canister ID: ${e}`,` Request ID: ${r.requestId}`,` HTTP status code: ${r.response.status}`,` HTTP status text: ${r.response.statusText}`].join(`
2
2
  `));try{let o=await u.pollForResponse(i,e,r.requestId,u.defaultStrategy());return new Uint8Array(o)}catch(o){if(o instanceof Error)return o;throw o}},A=async(i,e,a,c)=>{let r=await i.query(e,{methodName:a,arg:c});return r.status=="rejected"?new Error(["Call failed:",` Method: ${a}`,` Canister ID: ${e}`,` HTTP status code: ${r.reject_code}`,` HTTP status text: ${r.reject_message}`].join(`
3
3
  `)):new Uint8Array(r.reply.arg)};var y=class{constructor(e,a,c,r){this.agent=e;this.canisterId=a;this.updateFetcher=c;this.queryFetcher=r}static create(e={}){return new y(e.agent??P(),e.canisterId??I,e.updateCallOverride??w,e.queryCallOverride??A)}accountBalance=async({accountIdentifier:e,certified:a=!0})=>{let c=a?this.updateFetcher:this.queryFetcher,r=new n.AccountBalanceRequest;r.setAccount(e.toProto());let o=await c(this.agent,this.canisterId,"account_balance_pb",r.serializeBinary());if(o instanceof Error)throw Error;return l.fromE8s(BigInt(n.ICPTs.deserializeBinary(new Uint8Array(o)).getE8s()))};transfer=async({to:e,amount:a,memo:c})=>{let r=new n.SendRequest;r.setTo(e.toProto());let o=new n.Payment;if(o.setReceiverGets(a.toProto()),r.setPayment(o),c){let t=new n.Memo;t.setMemo(t.toString()),r.setMemo(t)}let s=await this.updateFetcher(this.agent,this.canisterId,"send_pb",r.serializeBinary());if(s instanceof Error){if(s.message.includes("Reject code: 5")){if(s.message.match(/Sending from (.*) is not allowed/))return new p;{let t=s.message.match(/transaction.*duplicate.* in block (\d+)/);if(t&&t.length>1)return new g(BigInt(t[1]))}{let t=s.message.match(/debit account.*, current balance: (\d*(\.\d*)?)/);if(t&&t.length>1){let h=l.fromString(t[1]);if(h instanceof l)return new d(h)}}if(s.message.includes("is in future"))return new f;{let t=s.message.match(/older than (\d+)/);if(t&&t.length>1)return new m(Number.parseInt(t[1]))}}throw s}return BigInt(n.BlockHeight.deserializeBinary(s).getHeight())}};export{p as a,b,d as c,m as d,f as e,g as f,y as g};
4
- //# sourceMappingURL=chunk-YL3F3CIN.js.map
4
+ //# sourceMappingURL=chunk-S7F2DG6L.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/ledger.ts", "../../src/types/ledger.ts", "../../src/utils/proto.utils.ts"],
4
- "sourcesContent": ["import { Agent } from \"@dfinity/agent\";\nimport { Principal } from \"@dfinity/principal\";\nimport {\n AccountBalanceRequest,\n BlockHeight as PbBlockHeight,\n ICPTs,\n Memo,\n Payment,\n SendRequest,\n} from \"../proto/ledger_pb\";\nimport { AccountIdentifier } from \"./account_identifier\";\nimport { MAINNET_LEDGER_CANISTER_ID } from \"./constants/canister_ids\";\nimport { ICP } from \"./icp\";\nimport { BlockHeight } from \"./types/common\";\nimport {\n Fetcher,\n InsufficientFunds,\n InvalidSender,\n LedgerCanisterOptions,\n TransferError,\n TxCreatedInFuture,\n TxDuplicate,\n TxTooOld,\n} from \"./types/ledger\";\nimport { defaultAgent } from \"./utils/agent.utils\";\nimport { queryCall, updateCall } from \"./utils/proto.utils\";\n\nexport class LedgerCanister {\n private constructor(\n private readonly agent: Agent,\n private readonly canisterId: Principal,\n private readonly updateFetcher: Fetcher,\n private readonly queryFetcher: Fetcher\n ) {}\n\n public static create(options: LedgerCanisterOptions = {}) {\n return new LedgerCanister(\n options.agent ?? defaultAgent(),\n options.canisterId ?? MAINNET_LEDGER_CANISTER_ID,\n options.updateCallOverride ?? updateCall,\n options.queryCallOverride ?? queryCall\n );\n }\n\n /**\n * Returns the balance of the specified account identifier.\n *\n * If `certified` is true, the request is fetched as an update call, otherwise\n * it is fetched using a query call.\n */\n public accountBalance = async ({\n accountIdentifier,\n certified = true,\n }: {\n accountIdentifier: AccountIdentifier;\n certified?: boolean;\n }): Promise<ICP> => {\n const callMethod = certified ? this.updateFetcher : this.queryFetcher;\n\n const request = new AccountBalanceRequest();\n request.setAccount(accountIdentifier.toProto());\n const responseBytes = await callMethod(\n this.agent,\n this.canisterId,\n \"account_balance_pb\",\n request.serializeBinary()\n );\n\n if (responseBytes instanceof Error) {\n // An error is never expected from this endpoint.\n throw Error;\n }\n\n return ICP.fromE8s(\n BigInt(ICPTs.deserializeBinary(new Uint8Array(responseBytes)).getE8s())\n );\n };\n\n /**\n * Transfer ICP from the caller to the destination `accountIdentifier`.\n * Returns the index of the block containing the tx if it was successful.\n *\n * TODO: support remaining options (subaccounts, memos, etc.)\n */\n public transfer = async ({\n to,\n amount,\n memo,\n }: {\n to: AccountIdentifier;\n amount: ICP;\n memo?: bigint;\n }): Promise<BlockHeight | TransferError> => {\n const request = new SendRequest();\n request.setTo(to.toProto());\n\n const payment = new Payment();\n payment.setReceiverGets(amount.toProto());\n request.setPayment(payment);\n\n if (memo) {\n const memo = new Memo();\n memo.setMemo(memo.toString());\n request.setMemo(memo);\n }\n\n const responseBytes = await this.updateFetcher(\n this.agent,\n this.canisterId,\n \"send_pb\",\n request.serializeBinary()\n );\n\n if (responseBytes instanceof Error) {\n if (responseBytes.message.includes(\"Reject code: 5\")) {\n // Match against the different error types.\n // This string matching is fragile. It's a stop-gap solution until\n // we migrate to the candid interface.\n\n if (responseBytes.message.match(/Sending from (.*) is not allowed/)) {\n return new InvalidSender();\n }\n\n {\n const m = responseBytes.message.match(\n /transaction.*duplicate.* in block (\\d+)/\n );\n if (m && m.length > 1) {\n return new TxDuplicate(BigInt(m[1]));\n }\n }\n\n {\n const m = responseBytes.message.match(\n /debit account.*, current balance: (\\d*(\\.\\d*)?)/\n );\n if (m && m.length > 1) {\n const balance = ICP.fromString(m[1]);\n if (balance instanceof ICP) {\n return new InsufficientFunds(balance);\n }\n }\n }\n\n if (responseBytes.message.includes(\"is in future\")) {\n return new TxCreatedInFuture();\n }\n\n {\n const m = responseBytes.message.match(/older than (\\d+)/);\n if (m && m.length > 1) {\n return new TxTooOld(Number.parseInt(m[1]));\n }\n }\n }\n\n // Unknown error. Throw as-is.\n throw responseBytes;\n }\n\n // Successful tx. Return the block height.\n return BigInt(PbBlockHeight.deserializeBinary(responseBytes).getHeight());\n };\n}\n", "import { Agent } from \"@dfinity/agent\";\nimport { Principal } from \"@dfinity/principal\";\nimport { ICP } from \"../icp\";\n\nexport type BlockHeight = bigint;\n\nexport type TransferError =\n | InvalidSender\n | InsufficientFunds\n | TxTooOld\n | TxCreatedInFuture\n | TxDuplicate\n | BadFee;\n\nexport class InvalidSender {}\nexport class BadFee {}\nexport class InsufficientFunds {\n constructor(public readonly balance: ICP) {}\n}\nexport class TxTooOld {\n constructor(public readonly allowed_window_secs: number) {}\n}\nexport class TxCreatedInFuture {}\nexport class TxDuplicate {\n constructor(public readonly duplicateOf: BlockHeight) {}\n}\n\nexport type Fetcher = (\n agent: Agent,\n canisterId: Principal,\n methodName: string,\n arg: ArrayBuffer\n) => Promise<Uint8Array | Error>;\n\n// HttpAgent options that can be used at construction.\nexport interface LedgerCanisterOptions {\n // The agent to use when communicating with the ledger canister.\n agent?: Agent;\n // The ledger canister's ID.\n canisterId?: Principal;\n // The method to use for performing an update call. Primarily overridden\n // in test for mocking.\n updateCallOverride?: Fetcher;\n // The method to use for performing a query call. Primarily overridden\n // in test for mocking.\n queryCallOverride?: Fetcher;\n}\n", "import { Agent, polling } from \"@dfinity/agent\";\nimport { Principal } from \"@dfinity/principal\";\n\n/**\n * Submits an update call to the IC.\n * @returns The (binary) response if the request succeeded, an error otherwise.\n */\nexport const updateCall = async (\n agent: Agent,\n canisterId: Principal,\n methodName: string,\n arg: ArrayBuffer\n): Promise<Uint8Array | Error> => {\n const submitResponse = await agent.call(canisterId, {\n methodName,\n arg,\n effectiveCanisterId: canisterId,\n });\n\n if (!submitResponse.response.ok) {\n return Error(\n [\n \"Call failed:\",\n ` Method: ${methodName}`,\n ` Canister ID: ${canisterId}`,\n ` Request ID: ${submitResponse.requestId}`,\n ` HTTP status code: ${submitResponse.response.status}`,\n ` HTTP status text: ${submitResponse.response.statusText}`,\n ].join(\"\\n\")\n );\n }\n\n try {\n const blob = await polling.pollForResponse(\n agent,\n canisterId,\n submitResponse.requestId,\n polling.defaultStrategy()\n );\n return new Uint8Array(blob);\n } catch (err) {\n if (err instanceof Error) {\n // Return errors rather than throw them so that callers are forced to handle them.\n return err;\n }\n\n // Something very wrong happened, and we don't know how to deal with it. Throw as-is.\n throw err;\n }\n};\n\n/**\n * Submits a query call to the IC.\n * @returns The (binary) response if the request succeeded, an error otherwise.\n */\nexport const queryCall = async (\n agent: Agent,\n canisterId: Principal,\n methodName: string,\n arg: ArrayBuffer\n): Promise<Uint8Array | Error> => {\n const queryResponse = await agent.query(canisterId, {\n methodName,\n arg,\n });\n\n if (queryResponse.status == \"rejected\") {\n return new Error(\n [\n \"Call failed:\",\n ` Method: ${methodName}`,\n ` Canister ID: ${canisterId}`,\n ` HTTP status code: ${queryResponse.reject_code}`,\n ` HTTP status text: ${queryResponse.reject_message}`,\n ].join(\"\\n\")\n );\n }\n\n return new Uint8Array(queryResponse.reply.arg);\n};\n"],
5
- "mappings": "8KAEA,MAOO,OCKA,WAAoB,GACpB,OAAa,GACb,OAAwB,CAC7B,YAA4B,EAAc,CAAd,iBAEvB,OAAe,CACpB,YAA4B,EAA6B,CAA7B,6BAEvB,OAAwB,GACxB,OAAkB,CACvB,YAA4B,EAA0B,CAA1B,qBCjBvB,GAAM,GAAa,MACxB,EACA,EACA,EACA,IACgC,CAChC,GAAM,GAAiB,KAAM,GAAM,KAAK,EAAY,CAClD,aACA,MACA,oBAAqB,IAGvB,GAAI,CAAC,EAAe,SAAS,GAC3B,MAAO,OACL,CACE,eACA,aAAa,IACb,kBAAkB,IAClB,iBAAiB,EAAe,YAChC,uBAAuB,EAAe,SAAS,SAC/C,uBAAuB,EAAe,SAAS,cAC/C,KAAK;AAAA,IAIX,GAAI,CACF,GAAM,GAAO,KAAM,GAAQ,gBACzB,EACA,EACA,EAAe,UACf,EAAQ,mBAEV,MAAO,IAAI,YAAW,SACf,EAAP,CACA,GAAI,YAAe,OAEjB,MAAO,GAIT,KAAM,KAQG,EAAY,MACvB,EACA,EACA,EACA,IACgC,CAChC,GAAM,GAAgB,KAAM,GAAM,MAAM,EAAY,CAClD,aACA,QAGF,MAAI,GAAc,QAAU,WACnB,GAAI,OACT,CACE,eACA,aAAa,IACb,kBAAkB,IAClB,uBAAuB,EAAc,cACrC,uBAAuB,EAAc,kBACrC,KAAK;AAAA,IAIJ,GAAI,YAAW,EAAc,MAAM,MFnDrC,WAAqB,CAClB,YACW,EACA,EACA,EACA,EACjB,CAJiB,aACA,kBACA,qBACA,0BAGL,QAAO,EAAiC,GAAI,CACxD,MAAO,IAAI,GACT,EAAQ,OAAS,IACjB,EAAQ,YAAc,EACtB,EAAQ,oBAAsB,EAC9B,EAAQ,mBAAqB,GAU1B,eAAiB,MAAO,CAC7B,oBACA,YAAY,MAIM,CAClB,GAAM,GAAa,EAAY,KAAK,cAAgB,KAAK,aAEnD,EAAU,GAAI,yBACpB,EAAQ,WAAW,EAAkB,WACrC,GAAM,GAAgB,KAAM,GAC1B,KAAK,MACL,KAAK,WACL,qBACA,EAAQ,mBAGV,GAAI,YAAyB,OAE3B,KAAM,OAGR,MAAO,GAAI,QACT,OAAO,QAAM,kBAAkB,GAAI,YAAW,IAAgB,YAU3D,SAAW,MAAO,CACvB,KACA,SACA,UAK0C,CAC1C,GAAM,GAAU,GAAI,eACpB,EAAQ,MAAM,EAAG,WAEjB,GAAM,GAAU,GAAI,WAIpB,GAHA,EAAQ,gBAAgB,EAAO,WAC/B,EAAQ,WAAW,GAEf,EAAM,CACR,GAAM,GAAO,GAAI,QACjB,EAAK,QAAQ,EAAK,YAClB,EAAQ,QAAQ,GAGlB,GAAM,GAAgB,KAAM,MAAK,cAC/B,KAAK,MACL,KAAK,WACL,UACA,EAAQ,mBAGV,GAAI,YAAyB,OAAO,CAClC,GAAI,EAAc,QAAQ,SAAS,kBAAmB,CAKpD,GAAI,EAAc,QAAQ,MAAM,oCAC9B,MAAO,IAAI,GAGb,CACE,GAAM,GAAI,EAAc,QAAQ,MAC9B,2CAEF,GAAI,GAAK,EAAE,OAAS,EAClB,MAAO,IAAI,GAAY,OAAO,EAAE,KAIpC,CACE,GAAM,GAAI,EAAc,QAAQ,MAC9B,mDAEF,GAAI,GAAK,EAAE,OAAS,EAAG,CACrB,GAAM,GAAU,EAAI,WAAW,EAAE,IACjC,GAAI,YAAmB,GACrB,MAAO,IAAI,GAAkB,IAKnC,GAAI,EAAc,QAAQ,SAAS,gBACjC,MAAO,IAAI,GAGb,CACE,GAAM,GAAI,EAAc,QAAQ,MAAM,oBACtC,GAAI,GAAK,EAAE,OAAS,EAClB,MAAO,IAAI,GAAS,OAAO,SAAS,EAAE,MAM5C,KAAM,GAIR,MAAO,QAAO,cAAc,kBAAkB,GAAe",
4
+ "sourcesContent": ["import { Agent } from \"@dfinity/agent\";\nimport { Principal } from \"@dfinity/principal\";\nimport {\n AccountBalanceRequest,\n BlockHeight as PbBlockHeight,\n ICPTs,\n Memo,\n Payment,\n SendRequest,\n} from \"../proto/ledger_pb\";\nimport { AccountIdentifier } from \"./account_identifier\";\nimport { MAINNET_LEDGER_CANISTER_ID } from \"./constants/canister_ids\";\nimport { ICP } from \"./icp\";\nimport { BlockHeight } from \"./types/common\";\nimport {\n Fetcher,\n InsufficientFunds,\n InvalidSender,\n LedgerCanisterOptions,\n TransferError,\n TxCreatedInFuture,\n TxDuplicate,\n TxTooOld,\n} from \"./types/ledger\";\nimport { defaultAgent } from \"./utils/agent.utils\";\nimport { queryCall, updateCall } from \"./utils/proto.utils\";\n\nexport class LedgerCanister {\n private constructor(\n private readonly agent: Agent,\n private readonly canisterId: Principal,\n private readonly updateFetcher: Fetcher,\n private readonly queryFetcher: Fetcher\n ) {}\n\n public static create(options: LedgerCanisterOptions = {}) {\n return new LedgerCanister(\n options.agent ?? defaultAgent(),\n options.canisterId ?? MAINNET_LEDGER_CANISTER_ID,\n options.updateCallOverride ?? updateCall,\n options.queryCallOverride ?? queryCall\n );\n }\n\n /**\n * Returns the balance of the specified account identifier.\n *\n * If `certified` is true, the request is fetched as an update call, otherwise\n * it is fetched using a query call.\n */\n public accountBalance = async ({\n accountIdentifier,\n certified = true,\n }: {\n accountIdentifier: AccountIdentifier;\n certified?: boolean;\n }): Promise<ICP> => {\n const callMethod = certified ? this.updateFetcher : this.queryFetcher;\n\n const request = new AccountBalanceRequest();\n request.setAccount(accountIdentifier.toProto());\n const responseBytes = await callMethod(\n this.agent,\n this.canisterId,\n \"account_balance_pb\",\n request.serializeBinary()\n );\n\n if (responseBytes instanceof Error) {\n // An error is never expected from this endpoint.\n throw Error;\n }\n\n return ICP.fromE8s(\n BigInt(ICPTs.deserializeBinary(new Uint8Array(responseBytes)).getE8s())\n );\n };\n\n /**\n * Transfer ICP from the caller to the destination `accountIdentifier`.\n * Returns the index of the block containing the tx if it was successful.\n *\n * TODO: support remaining options (subaccounts, memos, etc.)\n */\n public transfer = async ({\n to,\n amount,\n memo,\n }: {\n to: AccountIdentifier;\n amount: ICP;\n memo?: bigint;\n }): Promise<BlockHeight | TransferError> => {\n const request = new SendRequest();\n request.setTo(to.toProto());\n\n const payment = new Payment();\n payment.setReceiverGets(amount.toProto());\n request.setPayment(payment);\n\n if (memo) {\n const memo = new Memo();\n memo.setMemo(memo.toString());\n request.setMemo(memo);\n }\n\n const responseBytes = await this.updateFetcher(\n this.agent,\n this.canisterId,\n \"send_pb\",\n request.serializeBinary()\n );\n\n if (responseBytes instanceof Error) {\n if (responseBytes.message.includes(\"Reject code: 5\")) {\n // Match against the different error types.\n // This string matching is fragile. It's a stop-gap solution until\n // we migrate to the candid interface.\n\n if (responseBytes.message.match(/Sending from (.*) is not allowed/)) {\n return new InvalidSender();\n }\n\n {\n const m = responseBytes.message.match(\n /transaction.*duplicate.* in block (\\d+)/\n );\n if (m && m.length > 1) {\n return new TxDuplicate(BigInt(m[1]));\n }\n }\n\n {\n const m = responseBytes.message.match(\n /debit account.*, current balance: (\\d*(\\.\\d*)?)/\n );\n if (m && m.length > 1) {\n const balance = ICP.fromString(m[1]);\n if (balance instanceof ICP) {\n return new InsufficientFunds(balance);\n }\n }\n }\n\n if (responseBytes.message.includes(\"is in future\")) {\n return new TxCreatedInFuture();\n }\n\n {\n const m = responseBytes.message.match(/older than (\\d+)/);\n if (m && m.length > 1) {\n return new TxTooOld(Number.parseInt(m[1]));\n }\n }\n }\n\n // Unknown error. Throw as-is.\n throw responseBytes;\n }\n\n // Successful tx. Return the block height.\n return BigInt(PbBlockHeight.deserializeBinary(responseBytes).getHeight());\n };\n}\n", "import { Agent } from \"@dfinity/agent\";\nimport { Principal } from \"@dfinity/principal\";\nimport { ICP } from \"../icp\";\nimport { BlockHeight } from \"./common\";\n\nexport type TransferError =\n | InvalidSender\n | InsufficientFunds\n | TxTooOld\n | TxCreatedInFuture\n | TxDuplicate\n | BadFee;\n\nexport class InvalidSender {}\nexport class BadFee {}\nexport class InsufficientFunds {\n constructor(public readonly balance: ICP) {}\n}\nexport class TxTooOld {\n constructor(public readonly allowed_window_secs: number) {}\n}\nexport class TxCreatedInFuture {}\nexport class TxDuplicate {\n constructor(public readonly duplicateOf: BlockHeight) {}\n}\n\nexport type Fetcher = (\n agent: Agent,\n canisterId: Principal,\n methodName: string,\n arg: ArrayBuffer\n) => Promise<Uint8Array | Error>;\n\n// HttpAgent options that can be used at construction.\nexport interface LedgerCanisterOptions {\n // The agent to use when communicating with the ledger canister.\n agent?: Agent;\n // The ledger canister's ID.\n canisterId?: Principal;\n // The method to use for performing an update call. Primarily overridden\n // in test for mocking.\n updateCallOverride?: Fetcher;\n // The method to use for performing a query call. Primarily overridden\n // in test for mocking.\n queryCallOverride?: Fetcher;\n}\n", "import { Agent, polling } from \"@dfinity/agent\";\nimport { Principal } from \"@dfinity/principal\";\n\n/**\n * Submits an update call to the IC.\n * @returns The (binary) response if the request succeeded, an error otherwise.\n */\nexport const updateCall = async (\n agent: Agent,\n canisterId: Principal,\n methodName: string,\n arg: ArrayBuffer\n): Promise<Uint8Array | Error> => {\n const submitResponse = await agent.call(canisterId, {\n methodName,\n arg,\n effectiveCanisterId: canisterId,\n });\n\n if (!submitResponse.response.ok) {\n return Error(\n [\n \"Call failed:\",\n ` Method: ${methodName}`,\n ` Canister ID: ${canisterId}`,\n ` Request ID: ${submitResponse.requestId}`,\n ` HTTP status code: ${submitResponse.response.status}`,\n ` HTTP status text: ${submitResponse.response.statusText}`,\n ].join(\"\\n\")\n );\n }\n\n try {\n const blob = await polling.pollForResponse(\n agent,\n canisterId,\n submitResponse.requestId,\n polling.defaultStrategy()\n );\n return new Uint8Array(blob);\n } catch (err) {\n if (err instanceof Error) {\n // Return errors rather than throw them so that callers are forced to handle them.\n return err;\n }\n\n // Something very wrong happened, and we don't know how to deal with it. Throw as-is.\n throw err;\n }\n};\n\n/**\n * Submits a query call to the IC.\n * @returns The (binary) response if the request succeeded, an error otherwise.\n */\nexport const queryCall = async (\n agent: Agent,\n canisterId: Principal,\n methodName: string,\n arg: ArrayBuffer\n): Promise<Uint8Array | Error> => {\n const queryResponse = await agent.query(canisterId, {\n methodName,\n arg,\n });\n\n if (queryResponse.status == \"rejected\") {\n return new Error(\n [\n \"Call failed:\",\n ` Method: ${methodName}`,\n ` Canister ID: ${canisterId}`,\n ` HTTP status code: ${queryResponse.reject_code}`,\n ` HTTP status text: ${queryResponse.reject_message}`,\n ].join(\"\\n\")\n );\n }\n\n return new Uint8Array(queryResponse.reply.arg);\n};\n"],
5
+ "mappings": "8KAEA,MAOO,OCIA,WAAoB,GACpB,OAAa,GACb,OAAwB,CAC7B,YAA4B,EAAc,CAAd,iBAEvB,OAAe,CACpB,YAA4B,EAA6B,CAA7B,6BAEvB,OAAwB,GACxB,OAAkB,CACvB,YAA4B,EAA0B,CAA1B,qBChBvB,GAAM,GAAa,MACxB,EACA,EACA,EACA,IACgC,CAChC,GAAM,GAAiB,KAAM,GAAM,KAAK,EAAY,CAClD,aACA,MACA,oBAAqB,IAGvB,GAAI,CAAC,EAAe,SAAS,GAC3B,MAAO,OACL,CACE,eACA,aAAa,IACb,kBAAkB,IAClB,iBAAiB,EAAe,YAChC,uBAAuB,EAAe,SAAS,SAC/C,uBAAuB,EAAe,SAAS,cAC/C,KAAK;AAAA,IAIX,GAAI,CACF,GAAM,GAAO,KAAM,GAAQ,gBACzB,EACA,EACA,EAAe,UACf,EAAQ,mBAEV,MAAO,IAAI,YAAW,SACf,EAAP,CACA,GAAI,YAAe,OAEjB,MAAO,GAIT,KAAM,KAQG,EAAY,MACvB,EACA,EACA,EACA,IACgC,CAChC,GAAM,GAAgB,KAAM,GAAM,MAAM,EAAY,CAClD,aACA,QAGF,MAAI,GAAc,QAAU,WACnB,GAAI,OACT,CACE,eACA,aAAa,IACb,kBAAkB,IAClB,uBAAuB,EAAc,cACrC,uBAAuB,EAAc,kBACrC,KAAK;AAAA,IAIJ,GAAI,YAAW,EAAc,MAAM,MFnDrC,WAAqB,CAClB,YACW,EACA,EACA,EACA,EACjB,CAJiB,aACA,kBACA,qBACA,0BAGL,QAAO,EAAiC,GAAI,CACxD,MAAO,IAAI,GACT,EAAQ,OAAS,IACjB,EAAQ,YAAc,EACtB,EAAQ,oBAAsB,EAC9B,EAAQ,mBAAqB,GAU1B,eAAiB,MAAO,CAC7B,oBACA,YAAY,MAIM,CAClB,GAAM,GAAa,EAAY,KAAK,cAAgB,KAAK,aAEnD,EAAU,GAAI,yBACpB,EAAQ,WAAW,EAAkB,WACrC,GAAM,GAAgB,KAAM,GAC1B,KAAK,MACL,KAAK,WACL,qBACA,EAAQ,mBAGV,GAAI,YAAyB,OAE3B,KAAM,OAGR,MAAO,GAAI,QACT,OAAO,QAAM,kBAAkB,GAAI,YAAW,IAAgB,YAU3D,SAAW,MAAO,CACvB,KACA,SACA,UAK0C,CAC1C,GAAM,GAAU,GAAI,eACpB,EAAQ,MAAM,EAAG,WAEjB,GAAM,GAAU,GAAI,WAIpB,GAHA,EAAQ,gBAAgB,EAAO,WAC/B,EAAQ,WAAW,GAEf,EAAM,CACR,GAAM,GAAO,GAAI,QACjB,EAAK,QAAQ,EAAK,YAClB,EAAQ,QAAQ,GAGlB,GAAM,GAAgB,KAAM,MAAK,cAC/B,KAAK,MACL,KAAK,WACL,UACA,EAAQ,mBAGV,GAAI,YAAyB,OAAO,CAClC,GAAI,EAAc,QAAQ,SAAS,kBAAmB,CAKpD,GAAI,EAAc,QAAQ,MAAM,oCAC9B,MAAO,IAAI,GAGb,CACE,GAAM,GAAI,EAAc,QAAQ,MAC9B,2CAEF,GAAI,GAAK,EAAE,OAAS,EAClB,MAAO,IAAI,GAAY,OAAO,EAAE,KAIpC,CACE,GAAM,GAAI,EAAc,QAAQ,MAC9B,mDAEF,GAAI,GAAK,EAAE,OAAS,EAAG,CACrB,GAAM,GAAU,EAAI,WAAW,EAAE,IACjC,GAAI,YAAmB,GACrB,MAAO,IAAI,GAAkB,IAKnC,GAAI,EAAc,QAAQ,SAAS,gBACjC,MAAO,IAAI,GAGb,CACE,GAAM,GAAI,EAAc,QAAQ,MAAM,oBACtC,GAAI,GAAK,EAAE,OAAS,EAClB,MAAO,IAAI,GAAS,OAAO,SAAS,EAAE,MAM5C,KAAM,GAIR,MAAO,QAAO,cAAc,kBAAkB,GAAe",
6
6
  "names": []
7
7
  }
@@ -1,2 +1,2 @@
1
- import{g as a}from"./chunk-RPOIUQZO.js";import"./chunk-LNMGZ6W7.js";import"./chunk-HMU24NWJ.js";import"./chunk-FVDRR6PO.js";import"./chunk-4FZAJTYF.js";export{a as GovernanceCanister};
1
+ import{g as a}from"./chunk-JCV6KKSG.js";import"./chunk-LNMGZ6W7.js";import"./chunk-HMU24NWJ.js";import"./chunk-FVDRR6PO.js";import"./chunk-4FZAJTYF.js";export{a as GovernanceCanister};
2
2
  //# sourceMappingURL=governance.js.map
package/dist/esm/icp.js CHANGED
@@ -1,2 +1,2 @@
1
- import{b as a}from"./chunk-X2SHUWG3.js";import"./chunk-NYI672WX.js";import"./chunk-4FZAJTYF.js";export{a as ICP};
1
+ import{b as a}from"./chunk-QR4654XK.js";import"./chunk-2DZXLOEC.js";import"./chunk-4FZAJTYF.js";export{a as ICP};
2
2
  //# sourceMappingURL=icp.js.map
package/dist/esm/index.js CHANGED
@@ -1,2 +1,2 @@
1
- import{a as r,b as o}from"./chunk-SO23SIWX.js";import{a as m,b as p,c as x,d as n,e as c,f as i,g as e}from"./chunk-RPOIUQZO.js";import"./chunk-LNMGZ6W7.js";import{a as u,b as C,c as d,d as s,e as A,f as I,g as f}from"./chunk-YL3F3CIN.js";import"./chunk-HMU24NWJ.js";import"./chunk-FVDRR6PO.js";import{a,b as t}from"./chunk-X2SHUWG3.js";import"./chunk-NYI672WX.js";import"./chunk-4FZAJTYF.js";export{r as AccountIdentifier,C as BadFee,a as FromICPStringError,e as GovernanceCanister,t as ICP,d as InsufficientFunds,u as InvalidSender,f as LedgerCanister,m as NeuronState,p as ProposalRewardStatus,x as ProposalStatus,o as SubAccount,c as Topic,A as TxCreatedInFuture,I as TxDuplicate,s as TxTooOld,i as UnsupportedValueError,n as Vote};
1
+ import{a as r,b as o}from"./chunk-D2W3ELRE.js";import{a as m,b as p,c as x,d as n,e as c,f as i,g as e}from"./chunk-JCV6KKSG.js";import"./chunk-LNMGZ6W7.js";import{a as u,b as C,c as d,d as s,e as A,f as I,g as f}from"./chunk-S7F2DG6L.js";import"./chunk-HMU24NWJ.js";import"./chunk-FVDRR6PO.js";import{a,b as t}from"./chunk-QR4654XK.js";import"./chunk-2DZXLOEC.js";import"./chunk-4FZAJTYF.js";export{r as AccountIdentifier,C as BadFee,a as FromICPStringError,e as GovernanceCanister,t as ICP,d as InsufficientFunds,u as InvalidSender,f as LedgerCanister,m as NeuronState,p as ProposalRewardStatus,x as ProposalStatus,o as SubAccount,c as Topic,A as TxCreatedInFuture,I as TxDuplicate,s as TxTooOld,i as UnsupportedValueError,n as Vote};
2
2
  //# sourceMappingURL=index.js.map
@@ -1,2 +1,2 @@
1
- import{g as a}from"./chunk-YL3F3CIN.js";import"./chunk-HMU24NWJ.js";import"./chunk-FVDRR6PO.js";import"./chunk-X2SHUWG3.js";import"./chunk-NYI672WX.js";import"./chunk-4FZAJTYF.js";export{a as LedgerCanister};
1
+ import{g as a}from"./chunk-S7F2DG6L.js";import"./chunk-HMU24NWJ.js";import"./chunk-FVDRR6PO.js";import"./chunk-QR4654XK.js";import"./chunk-2DZXLOEC.js";import"./chunk-4FZAJTYF.js";export{a as LedgerCanister};
2
2
  //# sourceMappingURL=ledger.js.map
@@ -0,0 +1,60 @@
1
+ syntax = "proto3";
2
+
3
+ package ic_base_types.pb.v1;
4
+
5
+ import "google/protobuf/descriptor.proto";
6
+
7
+ // The annotated message is supported by hardware wallet signing.
8
+ // The numbering was chosen as the range 19000-19999 is anyway reserved in protobuf.
9
+ extend google.protobuf.MessageOptions {
10
+ bool tui_signed_message = 20000;
11
+ }
12
+
13
+ // The annotated field is displayed on the hardware wallet in the specification
14
+ // used by launch of the Internet Computer.
15
+ extend google.protobuf.FieldOptions {
16
+ bool tui_signed_display_q2_2021 = 20001;
17
+ }
18
+
19
+ // A PB container for a PrincipalId, which uniquely identifies
20
+ // a principal.
21
+ message PrincipalId {
22
+ option (tui_signed_message) = true;
23
+ bytes serialized_id = 1 [(tui_signed_display_q2_2021) = true];
24
+ }
25
+
26
+ // A PB container for a CanisterId, which uniquely identifies
27
+ // a principal.
28
+ message CanisterId {
29
+ bytes serialized_id = 1;
30
+ }
31
+
32
+ // A container for a NeuronId blob, which uniquely identifies
33
+ // a Neuron.
34
+ message NeuronId {
35
+ option (ic_base_types.pb.v1.tui_signed_message) = true;
36
+ // bytes serialized_id = 1;
37
+ reserved 1;
38
+ reserved 'serialized_id';
39
+ uint64 id = 2 [(ic_base_types.pb.v1.tui_signed_display_q2_2021) = true, jstype = JS_STRING];;
40
+ }
41
+
42
+ // The id of a specific proposal.
43
+ message ProposalId {
44
+ uint64 id = 1 [jstype = JS_STRING];
45
+ }
46
+
47
+ // A descriptor of the authorization of a single method.
48
+ // Any of the principals in the list are authorized to execute
49
+ // the method.
50
+ message MethodAuthzInfo {
51
+ string method_name = 1;
52
+ repeated bytes principal_ids = 2;
53
+ }
54
+
55
+ // A descriptor of the authorization of all the update methods in a
56
+ // canister that require authorization.
57
+ // Methods that should be accessible to anyone should not appear in this list
58
+ message CanisterAuthzInfo {
59
+ repeated MethodAuthzInfo methods_authz = 1;
60
+ }
@@ -0,0 +1,144 @@
1
+ // package: ic_base_types.pb.v1
2
+ // file: proto/base_types.proto
3
+
4
+ import * as jspb from "google-protobuf";
5
+ import * as google_protobuf_descriptor_pb from "google-protobuf/google/protobuf/descriptor_pb";
6
+
7
+ export class PrincipalId extends jspb.Message {
8
+ getSerializedId(): Uint8Array | string;
9
+ getSerializedId_asU8(): Uint8Array;
10
+ getSerializedId_asB64(): string;
11
+ setSerializedId(value: Uint8Array | string): void;
12
+
13
+ serializeBinary(): Uint8Array;
14
+ toObject(includeInstance?: boolean): PrincipalId.AsObject;
15
+ static toObject(includeInstance: boolean, msg: PrincipalId): PrincipalId.AsObject;
16
+ static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
17
+ static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
18
+ static serializeBinaryToWriter(message: PrincipalId, writer: jspb.BinaryWriter): void;
19
+ static deserializeBinary(bytes: Uint8Array): PrincipalId;
20
+ static deserializeBinaryFromReader(message: PrincipalId, reader: jspb.BinaryReader): PrincipalId;
21
+ }
22
+
23
+ export namespace PrincipalId {
24
+ export type AsObject = {
25
+ serializedId: Uint8Array | string,
26
+ }
27
+ }
28
+
29
+ export class CanisterId extends jspb.Message {
30
+ getSerializedId(): Uint8Array | string;
31
+ getSerializedId_asU8(): Uint8Array;
32
+ getSerializedId_asB64(): string;
33
+ setSerializedId(value: Uint8Array | string): void;
34
+
35
+ serializeBinary(): Uint8Array;
36
+ toObject(includeInstance?: boolean): CanisterId.AsObject;
37
+ static toObject(includeInstance: boolean, msg: CanisterId): CanisterId.AsObject;
38
+ static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
39
+ static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
40
+ static serializeBinaryToWriter(message: CanisterId, writer: jspb.BinaryWriter): void;
41
+ static deserializeBinary(bytes: Uint8Array): CanisterId;
42
+ static deserializeBinaryFromReader(message: CanisterId, reader: jspb.BinaryReader): CanisterId;
43
+ }
44
+
45
+ export namespace CanisterId {
46
+ export type AsObject = {
47
+ serializedId: Uint8Array | string,
48
+ }
49
+ }
50
+
51
+ export class NeuronId extends jspb.Message {
52
+ getId(): string;
53
+ setId(value: string): void;
54
+
55
+ serializeBinary(): Uint8Array;
56
+ toObject(includeInstance?: boolean): NeuronId.AsObject;
57
+ static toObject(includeInstance: boolean, msg: NeuronId): NeuronId.AsObject;
58
+ static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
59
+ static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
60
+ static serializeBinaryToWriter(message: NeuronId, writer: jspb.BinaryWriter): void;
61
+ static deserializeBinary(bytes: Uint8Array): NeuronId;
62
+ static deserializeBinaryFromReader(message: NeuronId, reader: jspb.BinaryReader): NeuronId;
63
+ }
64
+
65
+ export namespace NeuronId {
66
+ export type AsObject = {
67
+ id: string,
68
+ }
69
+ }
70
+
71
+ export class ProposalId extends jspb.Message {
72
+ getId(): string;
73
+ setId(value: string): void;
74
+
75
+ serializeBinary(): Uint8Array;
76
+ toObject(includeInstance?: boolean): ProposalId.AsObject;
77
+ static toObject(includeInstance: boolean, msg: ProposalId): ProposalId.AsObject;
78
+ static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
79
+ static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
80
+ static serializeBinaryToWriter(message: ProposalId, writer: jspb.BinaryWriter): void;
81
+ static deserializeBinary(bytes: Uint8Array): ProposalId;
82
+ static deserializeBinaryFromReader(message: ProposalId, reader: jspb.BinaryReader): ProposalId;
83
+ }
84
+
85
+ export namespace ProposalId {
86
+ export type AsObject = {
87
+ id: string,
88
+ }
89
+ }
90
+
91
+ export class MethodAuthzInfo extends jspb.Message {
92
+ getMethodName(): string;
93
+ setMethodName(value: string): void;
94
+
95
+ clearPrincipalIdsList(): void;
96
+ getPrincipalIdsList(): Array<Uint8Array | string>;
97
+ getPrincipalIdsList_asU8(): Array<Uint8Array>;
98
+ getPrincipalIdsList_asB64(): Array<string>;
99
+ setPrincipalIdsList(value: Array<Uint8Array | string>): void;
100
+ addPrincipalIds(value: Uint8Array | string, index?: number): Uint8Array | string;
101
+
102
+ serializeBinary(): Uint8Array;
103
+ toObject(includeInstance?: boolean): MethodAuthzInfo.AsObject;
104
+ static toObject(includeInstance: boolean, msg: MethodAuthzInfo): MethodAuthzInfo.AsObject;
105
+ static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
106
+ static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
107
+ static serializeBinaryToWriter(message: MethodAuthzInfo, writer: jspb.BinaryWriter): void;
108
+ static deserializeBinary(bytes: Uint8Array): MethodAuthzInfo;
109
+ static deserializeBinaryFromReader(message: MethodAuthzInfo, reader: jspb.BinaryReader): MethodAuthzInfo;
110
+ }
111
+
112
+ export namespace MethodAuthzInfo {
113
+ export type AsObject = {
114
+ methodName: string,
115
+ principalIdsList: Array<Uint8Array | string>,
116
+ }
117
+ }
118
+
119
+ export class CanisterAuthzInfo extends jspb.Message {
120
+ clearMethodsAuthzList(): void;
121
+ getMethodsAuthzList(): Array<MethodAuthzInfo>;
122
+ setMethodsAuthzList(value: Array<MethodAuthzInfo>): void;
123
+ addMethodsAuthz(value?: MethodAuthzInfo, index?: number): MethodAuthzInfo;
124
+
125
+ serializeBinary(): Uint8Array;
126
+ toObject(includeInstance?: boolean): CanisterAuthzInfo.AsObject;
127
+ static toObject(includeInstance: boolean, msg: CanisterAuthzInfo): CanisterAuthzInfo.AsObject;
128
+ static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
129
+ static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
130
+ static serializeBinaryToWriter(message: CanisterAuthzInfo, writer: jspb.BinaryWriter): void;
131
+ static deserializeBinary(bytes: Uint8Array): CanisterAuthzInfo;
132
+ static deserializeBinaryFromReader(message: CanisterAuthzInfo, reader: jspb.BinaryReader): CanisterAuthzInfo;
133
+ }
134
+
135
+ export namespace CanisterAuthzInfo {
136
+ export type AsObject = {
137
+ methodsAuthzList: Array<MethodAuthzInfo.AsObject>,
138
+ }
139
+ }
140
+
141
+ export const tuiSignedMessage: jspb.ExtensionFieldInfo<boolean>;
142
+
143
+ export const tuiSignedDisplayQ22021: jspb.ExtensionFieldInfo<boolean>;
144
+