@magic-ext/cosmos 7.0.0 → 8.0.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.
@@ -0,0 +1,2 @@
1
+ "use strict";var g=Object.defineProperty;var h=Object.getOwnPropertyDescriptor;var f=Object.getOwnPropertyNames;var y=Object.prototype.hasOwnProperty;var A=(r,s)=>{for(var n in s)g(r,n,{get:s[n],enumerable:!0})},S=(r,s,n,e)=>{if(s&&typeof s=="object"||typeof s=="function")for(let i of f(s))!y.call(r,i)&&i!==n&&g(r,i,{get:()=>s[i],enumerable:!(e=h(s,i))||e.enumerable});return r};var l=r=>S(g({},"__esModule",{value:!0}),r);var t=(r,s,n)=>new Promise((e,i)=>{var o=c=>{try{a(n.next(c))}catch(d){i(d)}},m=c=>{try{a(n.throw(c))}catch(d){i(d)}},a=c=>c.done?e(c.value):Promise.resolve(c.value).then(o,m);a((n=n.apply(r,s)).next())});var b={};A(b,{CosmosExtension:()=>p});module.exports=l(b);var u=require("@magic-sdk/commons");var p=class extends u.Extension.Internal{constructor(n){super();this.cosmosConfig=n;this.name="cosmos";this.config={};this.signAndBroadcast=(n,e)=>t(this,null,function*(){return this.request({id:42,jsonrpc:"2.0",method:"cos_signAndBroadcast",params:{message:n,fee:e}})});this.sign=(n,e)=>t(this,null,function*(){return this.request({id:42,jsonrpc:"2.0",method:"cos_sign",params:{message:n,fee:e}})});this.sendTokens=(n,e,i,o)=>t(this,null,function*(){return this.request({id:42,jsonrpc:"2.0",method:"cos_sendTokens",params:{recipientAddress:n,transferAmount:e,denom:i,memo:o}})});this.changeAddress=n=>t(this,null,function*(){return this.request({id:41,jsonrpc:"2.0",method:"cos_changeAddress",params:{prefix:n}})});this.config={rpcUrl:n.rpcUrl,chainType:"COSMOS"}}};
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/index.ts"],
4
+ "sourcesContent": ["import { Extension } from '@magic-sdk/commons';\nimport { CosmosConfig, CosmosPayloadMethod } from './type';\n\nexport class CosmosExtension extends Extension.Internal<'cosmos', any> {\n name = 'cosmos' as const;\n config: any = {};\n\n constructor(public cosmosConfig: CosmosConfig) {\n super();\n\n this.config = {\n rpcUrl: cosmosConfig.rpcUrl,\n chainType: 'COSMOS',\n };\n }\n\n public signAndBroadcast = async (message: any, fee: any) => {\n return this.request({\n id: 42,\n jsonrpc: '2.0',\n method: CosmosPayloadMethod.SignAndBroadcast,\n params: { message, fee },\n });\n };\n\n public sign = async (message: any, fee: any) => {\n return this.request({\n id: 42,\n jsonrpc: '2.0',\n method: CosmosPayloadMethod.Sign,\n params: { message, fee },\n });\n };\n\n public sendTokens = async (\n recipientAddress: string,\n transferAmount: string | number,\n denom: string,\n memo?: string,\n ) => {\n return this.request({\n id: 42,\n jsonrpc: '2.0',\n method: CosmosPayloadMethod.SendTokens,\n params: { recipientAddress, transferAmount, denom, memo },\n });\n };\n\n public changeAddress = async (prefix: string) => {\n return this.request({\n id: 41,\n jsonrpc: '2.0',\n method: CosmosPayloadMethod.ChangeAddress,\n params: { prefix },\n });\n };\n}\n"],
5
+ "mappings": "snBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,qBAAAE,IAAA,eAAAC,EAAAH,GAAA,IAAAI,EAA0B,8BAGnB,IAAMC,EAAN,cAA8B,YAAU,QAAwB,CAIrE,YAAmBC,EAA4B,CAC7C,MAAM,EADW,kBAAAA,EAHnB,UAAO,SACP,YAAc,CAAC,EAWf,KAAO,iBAAmB,CAAOC,EAAcC,IAAaC,EAAA,sBAC1D,OAAO,KAAK,QAAQ,CAClB,GAAI,GACJ,QAAS,MACT,8BACA,OAAQ,CAAE,QAAAF,EAAS,IAAAC,CAAI,CACzB,CAAC,CACH,GAEA,KAAO,KAAO,CAAOD,EAAcC,IAAaC,EAAA,sBAC9C,OAAO,KAAK,QAAQ,CAClB,GAAI,GACJ,QAAS,MACT,kBACA,OAAQ,CAAE,QAAAF,EAAS,IAAAC,CAAI,CACzB,CAAC,CACH,GAEA,KAAO,WAAa,CAClBE,EACAC,EACAC,EACAC,IACGJ,EAAA,sBACH,OAAO,KAAK,QAAQ,CAClB,GAAI,GACJ,QAAS,MACT,wBACA,OAAQ,CAAE,iBAAAC,EAAkB,eAAAC,EAAgB,MAAAC,EAAO,KAAAC,CAAK,CAC1D,CAAC,CACH,GAEA,KAAO,cAAuBC,GAAmBL,EAAA,sBAC/C,OAAO,KAAK,QAAQ,CAClB,GAAI,GACJ,QAAS,MACT,2BACA,OAAQ,CAAE,OAAAK,CAAO,CACnB,CAAC,CACH,GA7CE,KAAK,OAAS,CACZ,OAAQR,EAAa,OACrB,UAAW,QACb,CACF,CA0CF",
6
+ "names": ["src_exports", "__export", "CosmosExtension", "__toCommonJS", "import_commons", "CosmosExtension", "cosmosConfig", "message", "fee", "__async", "recipientAddress", "transferAmount", "denom", "memo", "prefix"]
7
+ }
@@ -0,0 +1,2 @@
1
+ var e=(a,d,n)=>new Promise((s,i)=>{var c=r=>{try{t(n.next(r))}catch(o){i(o)}},p=r=>{try{t(n.throw(r))}catch(o){i(o)}},t=r=>r.done?s(r.value):Promise.resolve(r.value).then(c,p);t((n=n.apply(a,d)).next())});import{Extension as u}from"@magic-sdk/commons";var g=class extends u.Internal{constructor(n){super();this.cosmosConfig=n;this.name="cosmos";this.config={};this.signAndBroadcast=(n,s)=>e(this,null,function*(){return this.request({id:42,jsonrpc:"2.0",method:"cos_signAndBroadcast",params:{message:n,fee:s}})});this.sign=(n,s)=>e(this,null,function*(){return this.request({id:42,jsonrpc:"2.0",method:"cos_sign",params:{message:n,fee:s}})});this.sendTokens=(n,s,i,c)=>e(this,null,function*(){return this.request({id:42,jsonrpc:"2.0",method:"cos_sendTokens",params:{recipientAddress:n,transferAmount:s,denom:i,memo:c}})});this.changeAddress=n=>e(this,null,function*(){return this.request({id:41,jsonrpc:"2.0",method:"cos_changeAddress",params:{prefix:n}})});this.config={rpcUrl:n.rpcUrl,chainType:"COSMOS"}}};export{g as CosmosExtension};
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/index.ts"],
4
+ "sourcesContent": ["import { Extension } from '@magic-sdk/commons';\nimport { CosmosConfig, CosmosPayloadMethod } from './type';\n\nexport class CosmosExtension extends Extension.Internal<'cosmos', any> {\n name = 'cosmos' as const;\n config: any = {};\n\n constructor(public cosmosConfig: CosmosConfig) {\n super();\n\n this.config = {\n rpcUrl: cosmosConfig.rpcUrl,\n chainType: 'COSMOS',\n };\n }\n\n public signAndBroadcast = async (message: any, fee: any) => {\n return this.request({\n id: 42,\n jsonrpc: '2.0',\n method: CosmosPayloadMethod.SignAndBroadcast,\n params: { message, fee },\n });\n };\n\n public sign = async (message: any, fee: any) => {\n return this.request({\n id: 42,\n jsonrpc: '2.0',\n method: CosmosPayloadMethod.Sign,\n params: { message, fee },\n });\n };\n\n public sendTokens = async (\n recipientAddress: string,\n transferAmount: string | number,\n denom: string,\n memo?: string,\n ) => {\n return this.request({\n id: 42,\n jsonrpc: '2.0',\n method: CosmosPayloadMethod.SendTokens,\n params: { recipientAddress, transferAmount, denom, memo },\n });\n };\n\n public changeAddress = async (prefix: string) => {\n return this.request({\n id: 41,\n jsonrpc: '2.0',\n method: CosmosPayloadMethod.ChangeAddress,\n params: { prefix },\n });\n };\n}\n"],
5
+ "mappings": "6MAAA,OAAS,aAAAA,MAAiB,qBAGnB,IAAMC,EAAN,cAA8BC,EAAU,QAAwB,CAIrE,YAAmBC,EAA4B,CAC7C,MAAM,EADW,kBAAAA,EAHnB,UAAO,SACP,YAAc,CAAC,EAWf,KAAO,iBAAmB,CAAOC,EAAcC,IAAaC,EAAA,sBAC1D,OAAO,KAAK,QAAQ,CAClB,GAAI,GACJ,QAAS,MACT,8BACA,OAAQ,CAAE,QAAAF,EAAS,IAAAC,CAAI,CACzB,CAAC,CACH,GAEA,KAAO,KAAO,CAAOD,EAAcC,IAAaC,EAAA,sBAC9C,OAAO,KAAK,QAAQ,CAClB,GAAI,GACJ,QAAS,MACT,kBACA,OAAQ,CAAE,QAAAF,EAAS,IAAAC,CAAI,CACzB,CAAC,CACH,GAEA,KAAO,WAAa,CAClBE,EACAC,EACAC,EACAC,IACGJ,EAAA,sBACH,OAAO,KAAK,QAAQ,CAClB,GAAI,GACJ,QAAS,MACT,wBACA,OAAQ,CAAE,iBAAAC,EAAkB,eAAAC,EAAgB,MAAAC,EAAO,KAAAC,CAAK,CAC1D,CAAC,CACH,GAEA,KAAO,cAAuBC,GAAmBL,EAAA,sBAC/C,OAAO,KAAK,QAAQ,CAClB,GAAI,GACJ,QAAS,MACT,2BACA,OAAQ,CAAE,OAAAK,CAAO,CACnB,CAAC,CACH,GA7CE,KAAK,OAAS,CACZ,OAAQR,EAAa,OACrB,UAAW,QACb,CACF,CA0CF",
6
+ "names": ["Extension", "CosmosExtension", "Extension", "cosmosConfig", "message", "fee", "__async", "recipientAddress", "transferAmount", "denom", "memo", "prefix"]
7
+ }
@@ -0,0 +1,2 @@
1
+ var e=(a,d,n)=>new Promise((s,i)=>{var c=r=>{try{t(n.next(r))}catch(o){i(o)}},p=r=>{try{t(n.throw(r))}catch(o){i(o)}},t=r=>r.done?s(r.value):Promise.resolve(r.value).then(c,p);t((n=n.apply(a,d)).next())});import{Extension as u}from"@magic-sdk/commons";var g=class extends u.Internal{constructor(n){super();this.cosmosConfig=n;this.name="cosmos";this.config={};this.signAndBroadcast=(n,s)=>e(this,null,function*(){return this.request({id:42,jsonrpc:"2.0",method:"cos_signAndBroadcast",params:{message:n,fee:s}})});this.sign=(n,s)=>e(this,null,function*(){return this.request({id:42,jsonrpc:"2.0",method:"cos_sign",params:{message:n,fee:s}})});this.sendTokens=(n,s,i,c)=>e(this,null,function*(){return this.request({id:42,jsonrpc:"2.0",method:"cos_sendTokens",params:{recipientAddress:n,transferAmount:s,denom:i,memo:c}})});this.changeAddress=n=>e(this,null,function*(){return this.request({id:41,jsonrpc:"2.0",method:"cos_changeAddress",params:{prefix:n}})});this.config={rpcUrl:n.rpcUrl,chainType:"COSMOS"}}};export{g as CosmosExtension};
2
+ //# sourceMappingURL=index.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/index.ts"],
4
+ "sourcesContent": ["import { Extension } from '@magic-sdk/commons';\nimport { CosmosConfig, CosmosPayloadMethod } from './type';\n\nexport class CosmosExtension extends Extension.Internal<'cosmos', any> {\n name = 'cosmos' as const;\n config: any = {};\n\n constructor(public cosmosConfig: CosmosConfig) {\n super();\n\n this.config = {\n rpcUrl: cosmosConfig.rpcUrl,\n chainType: 'COSMOS',\n };\n }\n\n public signAndBroadcast = async (message: any, fee: any) => {\n return this.request({\n id: 42,\n jsonrpc: '2.0',\n method: CosmosPayloadMethod.SignAndBroadcast,\n params: { message, fee },\n });\n };\n\n public sign = async (message: any, fee: any) => {\n return this.request({\n id: 42,\n jsonrpc: '2.0',\n method: CosmosPayloadMethod.Sign,\n params: { message, fee },\n });\n };\n\n public sendTokens = async (\n recipientAddress: string,\n transferAmount: string | number,\n denom: string,\n memo?: string,\n ) => {\n return this.request({\n id: 42,\n jsonrpc: '2.0',\n method: CosmosPayloadMethod.SendTokens,\n params: { recipientAddress, transferAmount, denom, memo },\n });\n };\n\n public changeAddress = async (prefix: string) => {\n return this.request({\n id: 41,\n jsonrpc: '2.0',\n method: CosmosPayloadMethod.ChangeAddress,\n params: { prefix },\n });\n };\n}\n"],
5
+ "mappings": "6MAAA,OAAS,aAAAA,MAAiB,qBAGnB,IAAMC,EAAN,cAA8BC,EAAU,QAAwB,CAIrE,YAAmBC,EAA4B,CAC7C,MAAM,EADW,kBAAAA,EAHnB,UAAO,SACP,YAAc,CAAC,EAWf,KAAO,iBAAmB,CAAOC,EAAcC,IAAaC,EAAA,sBAC1D,OAAO,KAAK,QAAQ,CAClB,GAAI,GACJ,QAAS,MACT,8BACA,OAAQ,CAAE,QAAAF,EAAS,IAAAC,CAAI,CACzB,CAAC,CACH,GAEA,KAAO,KAAO,CAAOD,EAAcC,IAAaC,EAAA,sBAC9C,OAAO,KAAK,QAAQ,CAClB,GAAI,GACJ,QAAS,MACT,kBACA,OAAQ,CAAE,QAAAF,EAAS,IAAAC,CAAI,CACzB,CAAC,CACH,GAEA,KAAO,WAAa,CAClBE,EACAC,EACAC,EACAC,IACGJ,EAAA,sBACH,OAAO,KAAK,QAAQ,CAClB,GAAI,GACJ,QAAS,MACT,wBACA,OAAQ,CAAE,iBAAAC,EAAkB,eAAAC,EAAgB,MAAAC,EAAO,KAAAC,CAAK,CAC1D,CAAC,CACH,GAEA,KAAO,cAAuBC,GAAmBL,EAAA,sBAC/C,OAAO,KAAK,QAAQ,CAClB,GAAI,GACJ,QAAS,MACT,2BACA,OAAQ,CAAE,OAAAK,CAAO,CACnB,CAAC,CACH,GA7CE,KAAK,OAAS,CACZ,OAAQR,EAAa,OACrB,UAAW,QACb,CACF,CA0CF",
6
+ "names": ["Extension", "CosmosExtension", "Extension", "cosmosConfig", "message", "fee", "__async", "recipientAddress", "transferAmount", "denom", "memo", "prefix"]
7
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";var MagicCosmosExtension=(()=>{var y=Object.create;var c=Object.defineProperty;var A=Object.getOwnPropertyDescriptor;var S=Object.getOwnPropertyNames;var x=Object.getPrototypeOf,b=Object.prototype.hasOwnProperty;var C=(n,r)=>()=>(r||n((r={exports:{}}).exports,r),r.exports),T=(n,r)=>{for(var s in r)c(n,s,{get:r[s],enumerable:!0})},m=(n,r,s,e)=>{if(r&&typeof r=="object"||typeof r=="function")for(let i of S(r))!b.call(n,i)&&i!==s&&c(n,i,{get:()=>r[i],enumerable:!(e=A(r,i))||e.enumerable});return n};var j=(n,r,s)=>(s=n!=null?y(x(n)):{},m(r||!n||!n.__esModule?c(s,"default",{value:n,enumerable:!0}):s,n)),k=n=>m(c({},"__esModule",{value:!0}),n);var o=(n,r,s)=>new Promise((e,i)=>{var p=t=>{try{d(s.next(t))}catch(g){i(g)}},l=t=>{try{d(s.throw(t))}catch(g){i(g)}},d=t=>t.done?e(t.value):Promise.resolve(t.value).then(p,l);d((s=s.apply(n,r)).next())});var h=C((U,u)=>{u.exports=Magic});var B={};T(B,{default:()=>q});var f=j(h());var a=class extends f.Extension.Internal{constructor(s){super();this.cosmosConfig=s;this.name="cosmos";this.config={};this.signAndBroadcast=(s,e)=>o(this,null,function*(){return this.request({id:42,jsonrpc:"2.0",method:"cos_signAndBroadcast",params:{message:s,fee:e}})});this.sign=(s,e)=>o(this,null,function*(){return this.request({id:42,jsonrpc:"2.0",method:"cos_sign",params:{message:s,fee:e}})});this.sendTokens=(s,e,i,p)=>o(this,null,function*(){return this.request({id:42,jsonrpc:"2.0",method:"cos_sendTokens",params:{recipientAddress:s,transferAmount:e,denom:i,memo:p}})});this.changeAddress=s=>o(this,null,function*(){return this.request({id:41,jsonrpc:"2.0",method:"cos_changeAddress",params:{prefix:s}})});this.config={rpcUrl:s.rpcUrl,chainType:"COSMOS"}}};var q=a;return k(B);})();
2
+ if (MagicCosmosExtension && MagicCosmosExtension.default != null) { MagicCosmosExtension = Object.assign(MagicCosmosExtension.default, MagicCosmosExtension); delete MagicCosmosExtension.default; }
@@ -0,0 +1,2 @@
1
+ "use strict";var d=Object.defineProperty;var h=Object.getOwnPropertyDescriptor;var f=Object.getOwnPropertyNames;var y=Object.prototype.hasOwnProperty;var A=(r,s)=>{for(var n in s)d(r,n,{get:s[n],enumerable:!0})},S=(r,s,n,e)=>{if(s&&typeof s=="object"||typeof s=="function")for(let i of f(s))!y.call(r,i)&&i!==n&&d(r,i,{get:()=>s[i],enumerable:!(e=h(s,i))||e.enumerable});return r};var l=r=>S(d({},"__esModule",{value:!0}),r);var t=(r,s,n)=>new Promise((e,i)=>{var o=c=>{try{a(n.next(c))}catch(p){i(p)}},u=c=>{try{a(n.throw(c))}catch(p){i(p)}},a=c=>c.done?e(c.value):Promise.resolve(c.value).then(o,u);a((n=n.apply(r,s)).next())});var b={};A(b,{CosmosExtension:()=>g});module.exports=l(b);var m=require("@magic-sdk/commons");var g=class extends m.Extension.Internal{constructor(n){super();this.cosmosConfig=n;this.name="cosmos";this.config={};this.signAndBroadcast=(n,e)=>t(this,null,function*(){return this.request({id:42,jsonrpc:"2.0",method:"cos_signAndBroadcast",params:{message:n,fee:e}})});this.sign=(n,e)=>t(this,null,function*(){return this.request({id:42,jsonrpc:"2.0",method:"cos_sign",params:{message:n,fee:e}})});this.sendTokens=(n,e,i,o)=>t(this,null,function*(){return this.request({id:42,jsonrpc:"2.0",method:"cos_sendTokens",params:{recipientAddress:n,transferAmount:e,denom:i,memo:o}})});this.changeAddress=n=>t(this,null,function*(){return this.request({id:41,jsonrpc:"2.0",method:"cos_changeAddress",params:{prefix:n}})});this.config={rpcUrl:n.rpcUrl,chainType:"COSMOS"}}};
2
+ //# sourceMappingURL=index.native.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/index.native.ts", "../../src/index.ts"],
4
+ "sourcesContent": ["export * from './index';\n", "import { Extension } from '@magic-sdk/commons';\nimport { CosmosConfig, CosmosPayloadMethod } from './type';\n\nexport class CosmosExtension extends Extension.Internal<'cosmos', any> {\n name = 'cosmos' as const;\n config: any = {};\n\n constructor(public cosmosConfig: CosmosConfig) {\n super();\n\n this.config = {\n rpcUrl: cosmosConfig.rpcUrl,\n chainType: 'COSMOS',\n };\n }\n\n public signAndBroadcast = async (message: any, fee: any) => {\n return this.request({\n id: 42,\n jsonrpc: '2.0',\n method: CosmosPayloadMethod.SignAndBroadcast,\n params: { message, fee },\n });\n };\n\n public sign = async (message: any, fee: any) => {\n return this.request({\n id: 42,\n jsonrpc: '2.0',\n method: CosmosPayloadMethod.Sign,\n params: { message, fee },\n });\n };\n\n public sendTokens = async (\n recipientAddress: string,\n transferAmount: string | number,\n denom: string,\n memo?: string,\n ) => {\n return this.request({\n id: 42,\n jsonrpc: '2.0',\n method: CosmosPayloadMethod.SendTokens,\n params: { recipientAddress, transferAmount, denom, memo },\n });\n };\n\n public changeAddress = async (prefix: string) => {\n return this.request({\n id: 41,\n jsonrpc: '2.0',\n method: CosmosPayloadMethod.ChangeAddress,\n params: { prefix },\n });\n };\n}\n"],
5
+ "mappings": "snBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,qBAAAE,IAAA,eAAAC,EAAAH,GCAA,IAAAI,EAA0B,8BAGnB,IAAMC,EAAN,cAA8B,YAAU,QAAwB,CAIrE,YAAmBC,EAA4B,CAC7C,MAAM,EADW,kBAAAA,EAHnB,UAAO,SACP,YAAc,CAAC,EAWf,KAAO,iBAAmB,CAAOC,EAAcC,IAAaC,EAAA,sBAC1D,OAAO,KAAK,QAAQ,CAClB,GAAI,GACJ,QAAS,MACT,8BACA,OAAQ,CAAE,QAAAF,EAAS,IAAAC,CAAI,CACzB,CAAC,CACH,GAEA,KAAO,KAAO,CAAOD,EAAcC,IAAaC,EAAA,sBAC9C,OAAO,KAAK,QAAQ,CAClB,GAAI,GACJ,QAAS,MACT,kBACA,OAAQ,CAAE,QAAAF,EAAS,IAAAC,CAAI,CACzB,CAAC,CACH,GAEA,KAAO,WAAa,CAClBE,EACAC,EACAC,EACAC,IACGJ,EAAA,sBACH,OAAO,KAAK,QAAQ,CAClB,GAAI,GACJ,QAAS,MACT,wBACA,OAAQ,CAAE,iBAAAC,EAAkB,eAAAC,EAAgB,MAAAC,EAAO,KAAAC,CAAK,CAC1D,CAAC,CACH,GAEA,KAAO,cAAuBC,GAAmBL,EAAA,sBAC/C,OAAO,KAAK,QAAQ,CAClB,GAAI,GACJ,QAAS,MACT,2BACA,OAAQ,CAAE,OAAAK,CAAO,CACnB,CAAC,CACH,GA7CE,KAAK,OAAS,CACZ,OAAQR,EAAa,OACrB,UAAW,QACb,CACF,CA0CF",
6
+ "names": ["index_native_exports", "__export", "CosmosExtension", "__toCommonJS", "import_commons", "CosmosExtension", "cosmosConfig", "message", "fee", "__async", "recipientAddress", "transferAmount", "denom", "memo", "prefix"]
7
+ }
@@ -0,0 +1,2 @@
1
+ import { CosmosExtension } from './index';
2
+ export default CosmosExtension;
@@ -0,0 +1,12 @@
1
+ import { Extension } from '@magic-sdk/commons';
2
+ import { CosmosConfig } from './type';
3
+ export declare class CosmosExtension extends Extension.Internal<'cosmos', any> {
4
+ cosmosConfig: CosmosConfig;
5
+ name: "cosmos";
6
+ config: any;
7
+ constructor(cosmosConfig: CosmosConfig);
8
+ signAndBroadcast: (message: any, fee: any) => Promise<any>;
9
+ sign: (message: any, fee: any) => Promise<any>;
10
+ sendTokens: (recipientAddress: string, transferAmount: string | number, denom: string, memo?: string | undefined) => Promise<any>;
11
+ changeAddress: (prefix: string) => Promise<any>;
12
+ }
@@ -0,0 +1 @@
1
+ export * from './index';
@@ -0,0 +1,9 @@
1
+ export interface CosmosConfig {
2
+ rpcUrl: string;
3
+ }
4
+ export declare enum CosmosPayloadMethod {
5
+ Sign = "cos_sign",
6
+ SignAndBroadcast = "cos_signAndBroadcast",
7
+ SendTokens = "cos_sendTokens",
8
+ ChangeAddress = "cos_changeAddress"
9
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@magic-ext/cosmos",
3
- "version": "7.0.0",
3
+ "version": "8.0.0",
4
4
  "description": "magic cosmos extension",
5
5
  "author": "Magic <team@magic.link> (https://magic.link/)",
6
6
  "license": "MIT",
@@ -28,7 +28,7 @@
28
28
  ]
29
29
  },
30
30
  "devDependencies": {
31
- "@magic-sdk/commons": "^8.0.0"
31
+ "@magic-sdk/commons": "^9.0.0"
32
32
  },
33
- "gitHead": "8ce6f975f0a1238c2945994f2d4aa6d6ac786998"
33
+ "gitHead": "4f0dd0871531afe5db7b966ec2ab502943cf8679"
34
34
  }