UNPKG

@dfinity/cmc

Version:

A library for interfacing with the cycle minting canister.

3 lines (2 loc) 533 B
var e=class extends Error{},n=class extends Error{},o=class extends Error{},r=class extends Error{},i=class extends Error{},s=({Err:t})=>{throw"Refunded"in t?new e(t.Refunded.reason):"InvalidTransaction"in t?new n(t.InvalidTransaction):"Processing"in t?new r:"TransactionTooOld"in t?new i:"Other"in t?new o(`Error in CMC with code ${t.Other.error_code}: ${t.Other.error_message}`):new Error(`Unsupported error type ${JSON.stringify(t)}`)};export{e as a,n as b,o as c,r as d,i as e,s as f}; //# sourceMappingURL=chunk-XRC5EOJ2.js.map