@dfinity/cmc
Advanced tools
Comparing version 3.1.0-next-2024-08-05 to 3.1.0-next-2024-08-10
@@ -26,4 +26,4 @@ /* Do not edit. Compiled with ./scripts/compile-idl-js from packages/cmc/candid/cmc.did */ | ||
const CanisterSettings = IDL.Record({ | ||
'controller' : IDL.Opt(IDL.Principal), | ||
'freezing_threshold' : IDL.Opt(IDL.Nat), | ||
'wasm_memory_threshold' : IDL.Opt(IDL.Nat), | ||
'controllers' : IDL.Opt(IDL.Vec(IDL.Principal)), | ||
@@ -30,0 +30,0 @@ 'reserved_cycles_limit' : IDL.Opt(IDL.Nat), |
@@ -8,4 +8,4 @@ import type { ActorMethod } from "@dfinity/agent"; | ||
export interface CanisterSettings { | ||
controller: [] | [Principal]; | ||
freezing_threshold: [] | [bigint]; | ||
wasm_memory_threshold: [] | [bigint]; | ||
controllers: [] | [Array<Principal>]; | ||
@@ -12,0 +12,0 @@ reserved_cycles_limit: [] | [bigint]; |
@@ -26,4 +26,4 @@ /* Do not edit. Compiled with ./scripts/compile-idl-js from packages/cmc/candid/cmc.did */ | ||
const CanisterSettings = IDL.Record({ | ||
'controller' : IDL.Opt(IDL.Principal), | ||
'freezing_threshold' : IDL.Opt(IDL.Nat), | ||
'wasm_memory_threshold' : IDL.Opt(IDL.Nat), | ||
'controllers' : IDL.Opt(IDL.Vec(IDL.Principal)), | ||
@@ -30,0 +30,0 @@ 'reserved_cycles_limit' : IDL.Opt(IDL.Nat), |
@@ -1,2 +0,2 @@ | ||
"use strict";var y=Object.defineProperty;var $=Object.getOwnPropertyDescriptor;var q=Object.getOwnPropertyNames;var z=Object.prototype.hasOwnProperty;var J=(t,e)=>{for(var r in e)y(t,r,{get:e[r],enumerable:!0})},X=(t,e,r,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of q(e))!z.call(t,n)&&n!==r&&y(t,n,{get:()=>e[n],enumerable:!(i=$(e,n))||i.enumerable});return t};var B=t=>X(y({},"__esModule",{value:!0}),t);var j={};J(j,{CMCCanister:()=>_,CMCError:()=>a,InvalidaTransactionError:()=>s,ProcessingError:()=>p,RefundedError:()=>c,TransactionTooOldError:()=>l,throwNotifyError:()=>d});module.exports=B(j);var m=require("@dfinity/agent");var C=({IDL:t})=>{let e=t.Variant({Set:t.Principal,Unset:t.Null}),r=t.Text,i=t.Record({exchange_rate_canister:t.Opt(e),cycles_ledger_canister_id:t.Opt(t.Principal),last_purged_notification:t.Opt(t.Nat64),governance_canister_id:t.Opt(t.Principal),minting_account_id:t.Opt(r),ledger_canister_id:t.Opt(t.Principal)}),n=t.Record({subnet_type:t.Opt(t.Text)}),f=t.Variant({Filter:n,Subnet:t.Record({subnet:t.Principal})}),N=t.Variant({controllers:t.Null,public:t.Null}),O=t.Record({controller:t.Opt(t.Principal),freezing_threshold:t.Opt(t.Nat),controllers:t.Opt(t.Vec(t.Principal)),reserved_cycles_limit:t.Opt(t.Nat),log_visibility:t.Opt(N),wasm_memory_limit:t.Opt(t.Nat),memory_allocation:t.Opt(t.Nat),compute_allocation:t.Opt(t.Nat)}),g=t.Record({subnet_selection:t.Opt(f),settings:t.Opt(O),subnet_type:t.Opt(t.Text)}),x=t.Variant({Refunded:t.Record({create_error:t.Text,refund_amount:t.Nat}),RefundFailed:t.Record({create_error:t.Text,refund_error:t.Text})}),R=t.Variant({Ok:t.Principal,Err:x}),b=t.Record({xdr_permyriad_per_icp:t.Nat64,timestamp_seconds:t.Nat64}),T=t.Record({certificate:t.Vec(t.Nat8),data:b,hash_tree:t.Vec(t.Nat8)}),h=t.Record({data:t.Vec(t.Tuple(t.Principal,t.Vec(t.Principal)))}),P=t.Record({data:t.Vec(t.Tuple(t.Text,t.Vec(t.Principal)))}),o=t.Nat64,E=t.Record({controller:t.Principal,block_index:o,subnet_selection:t.Opt(f),settings:t.Opt(O),subnet_type:t.Opt(t.Text)}),u=t.Variant({Refunded:t.Record({block_index:t.Opt(o),reason:t.Text}),InvalidTransaction:t.Text,Other:t.Record({error_message:t.Text,error_code:t.Nat64}),Processing:t.Null,TransactionTooOld:o}),w=t.Variant({Ok:t.Principal,Err:u}),v=t.Opt(t.Vec(t.Nat8)),V=t.Opt(t.Vec(t.Nat8)),S=t.Record({block_index:o,deposit_memo:v,to_subaccount:V}),A=t.Record({balance:t.Nat,block_index:t.Nat,minted:t.Nat}),k=t.Variant({Ok:A,Err:u}),F=t.Record({block_index:o,canister_id:t.Principal}),U=t.Nat,M=t.Variant({Ok:U,Err:u});return t.Service({create_canister:t.Func([g],[R],[]),get_build_metadata:t.Func([],[t.Text],["query"]),get_icp_xdr_conversion_rate:t.Func([],[T],["query"]),get_principals_authorized_to_create_canisters_to_subnets:t.Func([],[h],["query"]),get_subnet_types_to_subnets:t.Func([],[P],["query"]),notify_create_canister:t.Func([E],[w],[]),notify_mint_cycles:t.Func([S],[k],[]),notify_top_up:t.Func([F],[M],[])})};var c=class extends Error{},s=class extends Error{},a=class extends Error{},p=class extends Error{},l=class extends Error{},d=({Err:t})=>{throw"Refunded"in t?new c(t.Refunded.reason):"InvalidTransaction"in t?new s(t.InvalidTransaction):"Processing"in t?new p:"TransactionTooOld"in t?new l:"Other"in t?new a(`Error in CMC with code ${t.Other.error_code}: ${t.Other.error_message}`):new Error(`Unsupported error type ${JSON.stringify(t)}`)};var _=class t{constructor(e){this.service=e;this.getIcpToCyclesConversionRate=async()=>{let{data:e}=await this.service.get_icp_xdr_conversion_rate();return e.xdr_permyriad_per_icp};this.notifyCreateCanister=async e=>{let r=await this.service.notify_create_canister(e);if("Err"in r&&d(r),"Ok"in r)return r.Ok;throw new Error(`Unsupported response type in notifyCreateCanister ${JSON.stringify(r)}`)};this.notifyTopUp=async e=>{let r=await this.service.notify_top_up(e);if("Err"in r&&d(r),"Ok"in r)return r.Ok;throw new Error(`Unsupported response type in notifyTopUp ${JSON.stringify(r)}`)};this.service=e}static create(e){let r=e.agent,i=e.canisterId,n=e.serviceOverride??m.Actor.createActor(C,{agent:r,canisterId:i});return new t(n)}};0&&(module.exports={CMCCanister,CMCError,InvalidaTransactionError,ProcessingError,RefundedError,TransactionTooOldError,throwNotifyError}); | ||
"use strict";var y=Object.defineProperty;var $=Object.getOwnPropertyDescriptor;var q=Object.getOwnPropertyNames;var z=Object.prototype.hasOwnProperty;var J=(t,e)=>{for(var r in e)y(t,r,{get:e[r],enumerable:!0})},X=(t,e,r,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of q(e))!z.call(t,n)&&n!==r&&y(t,n,{get:()=>e[n],enumerable:!(i=$(e,n))||i.enumerable});return t};var B=t=>X(y({},"__esModule",{value:!0}),t);var j={};J(j,{CMCCanister:()=>_,CMCError:()=>a,InvalidaTransactionError:()=>s,ProcessingError:()=>p,RefundedError:()=>c,TransactionTooOldError:()=>l,throwNotifyError:()=>d});module.exports=B(j);var C=require("@dfinity/agent");var O=({IDL:t})=>{let e=t.Variant({Set:t.Principal,Unset:t.Null}),r=t.Text,i=t.Record({exchange_rate_canister:t.Opt(e),cycles_ledger_canister_id:t.Opt(t.Principal),last_purged_notification:t.Opt(t.Nat64),governance_canister_id:t.Opt(t.Principal),minting_account_id:t.Opt(r),ledger_canister_id:t.Opt(t.Principal)}),n=t.Record({subnet_type:t.Opt(t.Text)}),f=t.Variant({Filter:n,Subnet:t.Record({subnet:t.Principal})}),N=t.Variant({controllers:t.Null,public:t.Null}),m=t.Record({freezing_threshold:t.Opt(t.Nat),wasm_memory_threshold:t.Opt(t.Nat),controllers:t.Opt(t.Vec(t.Principal)),reserved_cycles_limit:t.Opt(t.Nat),log_visibility:t.Opt(N),wasm_memory_limit:t.Opt(t.Nat),memory_allocation:t.Opt(t.Nat),compute_allocation:t.Opt(t.Nat)}),g=t.Record({subnet_selection:t.Opt(f),settings:t.Opt(m),subnet_type:t.Opt(t.Text)}),x=t.Variant({Refunded:t.Record({create_error:t.Text,refund_amount:t.Nat}),RefundFailed:t.Record({create_error:t.Text,refund_error:t.Text})}),R=t.Variant({Ok:t.Principal,Err:x}),b=t.Record({xdr_permyriad_per_icp:t.Nat64,timestamp_seconds:t.Nat64}),h=t.Record({certificate:t.Vec(t.Nat8),data:b,hash_tree:t.Vec(t.Nat8)}),T=t.Record({data:t.Vec(t.Tuple(t.Principal,t.Vec(t.Principal)))}),E=t.Record({data:t.Vec(t.Tuple(t.Text,t.Vec(t.Principal)))}),o=t.Nat64,P=t.Record({controller:t.Principal,block_index:o,subnet_selection:t.Opt(f),settings:t.Opt(m),subnet_type:t.Opt(t.Text)}),u=t.Variant({Refunded:t.Record({block_index:t.Opt(o),reason:t.Text}),InvalidTransaction:t.Text,Other:t.Record({error_message:t.Text,error_code:t.Nat64}),Processing:t.Null,TransactionTooOld:o}),w=t.Variant({Ok:t.Principal,Err:u}),v=t.Opt(t.Vec(t.Nat8)),V=t.Opt(t.Vec(t.Nat8)),S=t.Record({block_index:o,deposit_memo:v,to_subaccount:V}),A=t.Record({balance:t.Nat,block_index:t.Nat,minted:t.Nat}),k=t.Variant({Ok:A,Err:u}),F=t.Record({block_index:o,canister_id:t.Principal}),U=t.Nat,M=t.Variant({Ok:U,Err:u});return t.Service({create_canister:t.Func([g],[R],[]),get_build_metadata:t.Func([],[t.Text],["query"]),get_icp_xdr_conversion_rate:t.Func([],[h],["query"]),get_principals_authorized_to_create_canisters_to_subnets:t.Func([],[T],["query"]),get_subnet_types_to_subnets:t.Func([],[E],["query"]),notify_create_canister:t.Func([P],[w],[]),notify_mint_cycles:t.Func([S],[k],[]),notify_top_up:t.Func([F],[M],[])})};var c=class extends Error{},s=class extends Error{},a=class extends Error{},p=class extends Error{},l=class extends Error{},d=({Err:t})=>{throw"Refunded"in t?new c(t.Refunded.reason):"InvalidTransaction"in t?new s(t.InvalidTransaction):"Processing"in t?new p:"TransactionTooOld"in t?new l:"Other"in t?new a(`Error in CMC with code ${t.Other.error_code}: ${t.Other.error_message}`):new Error(`Unsupported error type ${JSON.stringify(t)}`)};var _=class t{constructor(e){this.service=e;this.getIcpToCyclesConversionRate=async()=>{let{data:e}=await this.service.get_icp_xdr_conversion_rate();return e.xdr_permyriad_per_icp};this.notifyCreateCanister=async e=>{let r=await this.service.notify_create_canister(e);if("Err"in r&&d(r),"Ok"in r)return r.Ok;throw new Error(`Unsupported response type in notifyCreateCanister ${JSON.stringify(r)}`)};this.notifyTopUp=async e=>{let r=await this.service.notify_top_up(e);if("Err"in r&&d(r),"Ok"in r)return r.Ok;throw new Error(`Unsupported response type in notifyTopUp ${JSON.stringify(r)}`)};this.service=e}static create(e){let r=e.agent,i=e.canisterId,n=e.serviceOverride??C.Actor.createActor(O,{agent:r,canisterId:i});return new t(n)}};0&&(module.exports={CMCCanister,CMCError,InvalidaTransactionError,ProcessingError,RefundedError,TransactionTooOldError,throwNotifyError}); | ||
//# sourceMappingURL=index.cjs.js.map |
@@ -1,2 +0,2 @@ | ||
import{a}from"./chunk-DUAUNPLR.js";import"./chunk-XRC5EOJ2.js";export{a as CMCCanister}; | ||
import{a}from"./chunk-VL2WH3AX.js";import"./chunk-XRC5EOJ2.js";export{a as CMCCanister}; | ||
//# sourceMappingURL=cmc.canister.js.map |
@@ -1,2 +0,2 @@ | ||
import{a as r}from"./chunk-DUAUNPLR.js";import{a as e,b as o,c as t,d as p,e as C,f}from"./chunk-XRC5EOJ2.js";export{r as CMCCanister,t as CMCError,o as InvalidaTransactionError,p as ProcessingError,e as RefundedError,C as TransactionTooOldError,f as throwNotifyError}; | ||
import{a as r}from"./chunk-VL2WH3AX.js";import{a as e,b as o,c as t,d as p,e as C,f}from"./chunk-XRC5EOJ2.js";export{r as CMCCanister,t as CMCError,o as InvalidaTransactionError,p as ProcessingError,e as RefundedError,C as TransactionTooOldError,f as throwNotifyError}; | ||
//# sourceMappingURL=index.js.map |
{ | ||
"name": "@dfinity/cmc", | ||
"version": "3.1.0-next-2024-08-05", | ||
"version": "3.1.0-next-2024-08-10", | ||
"description": "A library for interfacing with the cycle minting canister.", | ||
@@ -5,0 +5,0 @@ "license": "Apache-2.0", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
82784