@dfinity/ic-management
Advanced tools
Comparing version 0.0.2 to 0.0.3
@@ -1,2 +0,2 @@ | ||
"use strict";var o=Object.defineProperty;var d=Object.getOwnPropertyDescriptor;var f=Object.getOwnPropertyNames;var u=Object.prototype.hasOwnProperty;var y=(s,e)=>{for(var t in e)o(s,t,{get:e[t],enumerable:!0})},v=(s,e,t,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of f(e))!u.call(s,a)&&a!==t&&o(s,a,{get:()=>e[a],enumerable:!(r=d(e,a))||r.enumerable});return s};var l=s=>v(o({},"__esModule",{value:!0}),s);var C={};y(C,{ICManagementCanister:()=>i});module.exports=l(C);var p=require("@dfinity/agent"),m=require("@dfinity/principal"),n=require("@dfinity/utils"),i=class{constructor(e){this.service=e;this.canisterStatus=e=>this.service.canister_status({canister_id:e});this.updateSettings=async({canisterId:e,settings:{controllers:t,freezingThreshold:r,memoryAllocation:a,computeAllocation:c}})=>this.service.update_settings({canister_id:e,settings:{controllers:(0,n.toNullable)(t==null?void 0:t.map(g=>m.Principal.fromText(g))),freezing_threshold:(0,n.toNullable)(r),memory_allocation:(0,n.toNullable)(a),compute_allocation:(0,n.toNullable)(c)}});this.service=e}static create(e){let t=e.agent,r=e.serviceOverride??(0,p.getManagementCanister)({agent:t});return new i(r)}};0&&(module.exports={ICManagementCanister}); | ||
"use strict";var o=Object.defineProperty;var d=Object.getOwnPropertyDescriptor;var f=Object.getOwnPropertyNames;var u=Object.prototype.hasOwnProperty;var y=(r,e)=>{for(var t in e)o(r,t,{get:e[t],enumerable:!0})},v=(r,e,t,a)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of f(e))!u.call(r,s)&&s!==t&&o(r,s,{get:()=>e[s],enumerable:!(a=d(e,s))||a.enumerable});return r};var l=r=>v(o({},"__esModule",{value:!0}),r);var C={};y(C,{ICManagementCanister:()=>i});module.exports=l(C);var p=require("@dfinity/agent"),m=require("@dfinity/principal"),n=require("@dfinity/utils"),i=class{constructor(e){this.service=e;this.canisterStatus=e=>this.service.canister_status({canister_id:e});this.updateSettings=async({canisterId:e,settings:{controllers:t,freezingThreshold:a,memoryAllocation:s,computeAllocation:c}})=>this.service.update_settings({canister_id:e,settings:{controllers:(0,n.toNullable)(t==null?void 0:t.map(g=>m.Principal.fromText(g))),freezing_threshold:(0,n.toNullable)(a),memory_allocation:(0,n.toNullable)(s),compute_allocation:(0,n.toNullable)(c)}});this.service=e}static create(e){let t=e.agent,a=e.serviceOverride??(0,p.getManagementCanister)({agent:t});return new i(a)}};0&&(module.exports={ICManagementCanister}); | ||
//# sourceMappingURL=index.cjs.js.map |
export { ICManagementCanister } from "./ic-management.canister"; | ||
export * from "./types/canister.options"; | ||
export * from "./types/ic-management.params"; | ||
export * from "./types/ic-management.responses"; |
{ | ||
"name": "@dfinity/ic-management", | ||
"version": "0.0.2", | ||
"version": "0.0.3", | ||
"description": "A library for interfacing with the IC management canister.", | ||
@@ -5,0 +5,0 @@ "license": "Apache-2.0", |
Sorry, the diff of this file is not supported yet
55031
872