@magic-ext/cosmos 3.0.0 → 3.0.1
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.
- package/CHANGELOG.md +13 -0
- package/dist/cjs/index.js +1 -1
- package/dist/cjs/index.js.map +3 -3
- package/dist/es/index.js +1 -1
- package/dist/es/index.js.map +3 -3
- package/dist/es/index.mjs +1 -1
- package/dist/es/index.mjs.map +3 -3
- package/dist/extension.js +2 -1
- package/dist/react-native/index.native.js +1 -1
- package/dist/react-native/index.native.js.map +3 -3
- package/dist/types/index.cdn.d.ts +1 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,16 @@
|
|
|
1
|
+
# v3.0.1 (Tue Jan 25 2022)
|
|
2
|
+
|
|
3
|
+
#### 🐛 Bug Fix
|
|
4
|
+
|
|
5
|
+
- Fix CDN build targets [#270](https://github.com/magiclabs/magic-js/pull/270) ([@smithki](https://github.com/smithki))
|
|
6
|
+
- Fix CDN issues related to ESBuild ([@smithki](https://github.com/smithki))
|
|
7
|
+
|
|
8
|
+
#### Authors: 1
|
|
9
|
+
|
|
10
|
+
- Ian K Smith ([@smithki](https://github.com/smithki))
|
|
11
|
+
|
|
12
|
+
---
|
|
13
|
+
|
|
1
14
|
# v3.0.0 (Tue Jan 25 2022)
|
|
2
15
|
|
|
3
16
|
#### 💥 Breaking Change
|
package/dist/cjs/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var
|
|
1
|
+
var p=Object.defineProperty;var f=Object.getOwnPropertyDescriptor;var y=Object.getOwnPropertyNames;var S=Object.prototype.hasOwnProperty;var l=r=>p(r,"__esModule",{value:!0});var h=(r,n)=>{for(var s in n)p(r,s,{get:n[s],enumerable:!0})},b=(r,n,s,e)=>{if(n&&typeof n=="object"||typeof n=="function")for(let o of y(n))!S.call(r,o)&&(s||o!=="default")&&p(r,o,{get:()=>n[o],enumerable:!(e=f(n,o))||e.enumerable});return r};var x=(r=>(n,s)=>r&&r.get(n)||(s=b(l({}),n,1),r&&r.set(n,s),s))(typeof WeakMap!="undefined"?new WeakMap:0);var t=(r,n,s)=>new Promise((e,o)=>{var d=i=>{try{c(s.next(i))}catch(a){o(a)}},u=i=>{try{c(s.throw(i))}catch(a){o(a)}},c=i=>i.done?e(i.value):Promise.resolve(i.value).then(d,u);c((s=s.apply(r,n)).next())});var C={};h(C,{CosmosExtension:()=>m});var g=require("@magic-sdk/commons");var m=class extends g.Extension.Internal{constructor(n){super();this.cosmosConfig=n;this.name="cosmos";this.config={};this.signAndBroadcast=(n,s)=>t(this,null,function*(){return this.request({id:42,jsonrpc:"2.0",method:"cos_signAndBroadcast",params:{message:n,fee:s}})});this.sign=(n,s)=>t(this,null,function*(){return this.request({id:42,jsonrpc:"2.0",method:"cos_sign",params:{message:n,fee:s}})});this.sendTokens=(n,s,e,o)=>t(this,null,function*(){return this.request({id:42,jsonrpc:"2.0",method:"cos_sendTokens",params:{recipientAddress:n,transferAmount:s,denom:e,memo:o}})});this.config={rpcUrl:n.rpcUrl,chainType:"COSMOS"}}};module.exports=x(C);
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
package/dist/cjs/index.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
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"
|
|
5
|
-
"mappings": "
|
|
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"],
|
|
5
|
+
"mappings": "2tBAAA,4CAA0B,8BAGnB,mBAA8B,aAAU,QAAwB,CAIrE,YAAmB,EAA4B,CAC7C,QADiB,oBAHnB,UAAO,SACP,YAAc,GAWP,sBAAmB,CAAO,EAAc,IAAa,wBAC1D,MAAO,MAAK,QAAQ,CAClB,GAAI,GACJ,QAAS,MACT,OAAQ,uBACR,OAAQ,CAAE,UAAS,WAIhB,UAAO,CAAO,EAAc,IAAa,wBAC9C,MAAO,MAAK,QAAQ,CAClB,GAAI,GACJ,QAAS,MACT,OAAQ,WACR,OAAQ,CAAE,UAAS,WAIhB,gBAAa,CAClB,EACA,EACA,EACA,IACG,wBACH,MAAO,MAAK,QAAQ,CAClB,GAAI,GACJ,QAAS,MACT,OAAQ,iBACR,OAAQ,CAAE,mBAAkB,iBAAgB,QAAO,YAlCrD,KAAK,OAAS,CACZ,OAAQ,EAAa,OACrB,UAAW",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/dist/es/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var
|
|
1
|
+
var i=(a,s,n)=>new Promise((e,o)=>{var p=r=>{try{t(n.next(r))}catch(c){o(c)}},g=r=>{try{t(n.throw(r))}catch(c){o(c)}},t=r=>r.done?e(r.value):Promise.resolve(r.value).then(p,g);t((n=n.apply(a,s)).next())});import{Extension as m}from"@magic-sdk/commons";var d=class extends m.Internal{constructor(s){super();this.cosmosConfig=s;this.name="cosmos";this.config={};this.signAndBroadcast=(s,n)=>i(this,null,function*(){return this.request({id:42,jsonrpc:"2.0",method:"cos_signAndBroadcast",params:{message:s,fee:n}})});this.sign=(s,n)=>i(this,null,function*(){return this.request({id:42,jsonrpc:"2.0",method:"cos_sign",params:{message:s,fee:n}})});this.sendTokens=(s,n,e,o)=>i(this,null,function*(){return this.request({id:42,jsonrpc:"2.0",method:"cos_sendTokens",params:{recipientAddress:s,transferAmount:n,denom:e,memo:o}})});this.config={rpcUrl:s.rpcUrl,chainType:"COSMOS"}}};export{d as CosmosExtension};
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
package/dist/es/index.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
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"
|
|
5
|
-
"mappings": "6MAAA,+
|
|
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"],
|
|
5
|
+
"mappings": "6MAAA,+CAGO,mBAA8B,GAAU,QAAwB,CAIrE,YAAmB,EAA4B,CAC7C,QADiB,oBAHnB,UAAO,SACP,YAAc,GAWP,sBAAmB,CAAO,EAAc,IAAa,wBAC1D,MAAO,MAAK,QAAQ,CAClB,GAAI,GACJ,QAAS,MACT,OAAQ,uBACR,OAAQ,CAAE,UAAS,WAIhB,UAAO,CAAO,EAAc,IAAa,wBAC9C,MAAO,MAAK,QAAQ,CAClB,GAAI,GACJ,QAAS,MACT,OAAQ,WACR,OAAQ,CAAE,UAAS,WAIhB,gBAAa,CAClB,EACA,EACA,EACA,IACG,wBACH,MAAO,MAAK,QAAQ,CAClB,GAAI,GACJ,QAAS,MACT,OAAQ,iBACR,OAAQ,CAAE,mBAAkB,iBAAgB,QAAO,YAlCrD,KAAK,OAAS,CACZ,OAAQ,EAAa,OACrB,UAAW",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/dist/es/index.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var
|
|
1
|
+
var i=(a,s,n)=>new Promise((e,o)=>{var p=r=>{try{t(n.next(r))}catch(c){o(c)}},g=r=>{try{t(n.throw(r))}catch(c){o(c)}},t=r=>r.done?e(r.value):Promise.resolve(r.value).then(p,g);t((n=n.apply(a,s)).next())});import{Extension as m}from"@magic-sdk/commons";var d=class extends m.Internal{constructor(s){super();this.cosmosConfig=s;this.name="cosmos";this.config={};this.signAndBroadcast=(s,n)=>i(this,null,function*(){return this.request({id:42,jsonrpc:"2.0",method:"cos_signAndBroadcast",params:{message:s,fee:n}})});this.sign=(s,n)=>i(this,null,function*(){return this.request({id:42,jsonrpc:"2.0",method:"cos_sign",params:{message:s,fee:n}})});this.sendTokens=(s,n,e,o)=>i(this,null,function*(){return this.request({id:42,jsonrpc:"2.0",method:"cos_sendTokens",params:{recipientAddress:s,transferAmount:n,denom:e,memo:o}})});this.config={rpcUrl:s.rpcUrl,chainType:"COSMOS"}}};export{d as CosmosExtension};
|
|
2
2
|
//# sourceMappingURL=index.mjs.map
|
package/dist/es/index.mjs.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
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"
|
|
5
|
-
"mappings": "6MAAA,+
|
|
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"],
|
|
5
|
+
"mappings": "6MAAA,+CAGO,mBAA8B,GAAU,QAAwB,CAIrE,YAAmB,EAA4B,CAC7C,QADiB,oBAHnB,UAAO,SACP,YAAc,GAWP,sBAAmB,CAAO,EAAc,IAAa,wBAC1D,MAAO,MAAK,QAAQ,CAClB,GAAI,GACJ,QAAS,MACT,OAAQ,uBACR,OAAQ,CAAE,UAAS,WAIhB,UAAO,CAAO,EAAc,IAAa,wBAC9C,MAAO,MAAK,QAAQ,CAClB,GAAI,GACJ,QAAS,MACT,OAAQ,WACR,OAAQ,CAAE,UAAS,WAIhB,gBAAa,CAClB,EACA,EACA,EACA,IACG,wBACH,MAAO,MAAK,QAAQ,CAClB,GAAI,GACJ,QAAS,MACT,OAAQ,iBACR,OAAQ,CAAE,mBAAkB,iBAAgB,QAAO,YAlCrD,KAAK,OAAS,CACZ,OAAQ,EAAa,OACrB,UAAW",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/dist/extension.js
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
var MagicCosmosExtension=(()=>{var
|
|
1
|
+
var MagicCosmosExtension=(()=>{var S=Object.create;var e=Object.defineProperty;var h=Object.getOwnPropertyDescriptor;var C=Object.getOwnPropertyNames;var b=Object.getPrototypeOf,T=Object.prototype.hasOwnProperty;var m=s=>e(s,"__esModule",{value:!0});var k=(s,n)=>()=>(n||s((n={exports:{}}).exports,n),n.exports),A=(s,n)=>{for(var r in n)e(s,r,{get:n[r],enumerable:!0})},d=(s,n,r,t)=>{if(n&&typeof n=="object"||typeof n=="function")for(let o of C(n))!T.call(s,o)&&(r||o!=="default")&&e(s,o,{get:()=>n[o],enumerable:!(t=h(n,o))||t.enumerable});return s},B=(s,n)=>d(m(e(s!=null?S(b(s)):{},"default",!n&&s&&s.__esModule?{get:()=>s.default,enumerable:!0}:{value:s,enumerable:!0})),s),j=(s=>(n,r)=>s&&s.get(n)||(r=d(m({}),n,1),s&&s.set(n,r),r))(typeof WeakMap!="undefined"?new WeakMap:0);var c=(s,n,r)=>new Promise((t,o)=>{var x=i=>{try{a(r.next(i))}catch(p){o(p)}},y=i=>{try{a(r.throw(i))}catch(p){o(p)}},a=i=>i.done?t(i.value):Promise.resolve(i.value).then(x,y);a((r=r.apply(s,n)).next())});var f=k((E,u)=>{u.exports=Magic});var U={};A(U,{default:()=>q});var l=B(f());var g=class extends l.Extension.Internal{constructor(n){super();this.cosmosConfig=n;this.name="cosmos";this.config={};this.signAndBroadcast=(n,r)=>c(this,null,function*(){return this.request({id:42,jsonrpc:"2.0",method:"cos_signAndBroadcast",params:{message:n,fee:r}})});this.sign=(n,r)=>c(this,null,function*(){return this.request({id:42,jsonrpc:"2.0",method:"cos_sign",params:{message:n,fee:r}})});this.sendTokens=(n,r,t,o)=>c(this,null,function*(){return this.request({id:42,jsonrpc:"2.0",method:"cos_sendTokens",params:{recipientAddress:n,transferAmount:r,denom:t,memo:o}})});this.config={rpcUrl:n.rpcUrl,chainType:"COSMOS"}}};var q=g;return j(U);})();
|
|
2
|
+
if (MagicCosmosExtension && MagicCosmosExtension.default != null) { MagicCosmosExtension = Object.assign(MagicCosmosExtension.default, MagicCosmosExtension); delete MagicCosmosExtension.default; }
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var
|
|
1
|
+
var p=Object.defineProperty;var f=Object.getOwnPropertyDescriptor;var y=Object.getOwnPropertyNames;var S=Object.prototype.hasOwnProperty;var l=r=>p(r,"__esModule",{value:!0});var h=(r,n)=>{for(var s in n)p(r,s,{get:n[s],enumerable:!0})},b=(r,n,s,e)=>{if(n&&typeof n=="object"||typeof n=="function")for(let o of y(n))!S.call(r,o)&&(s||o!=="default")&&p(r,o,{get:()=>n[o],enumerable:!(e=f(n,o))||e.enumerable});return r};var x=(r=>(n,s)=>r&&r.get(n)||(s=b(l({}),n,1),r&&r.set(n,s),s))(typeof WeakMap!="undefined"?new WeakMap:0);var t=(r,n,s)=>new Promise((e,o)=>{var d=i=>{try{c(s.next(i))}catch(a){o(a)}},u=i=>{try{c(s.throw(i))}catch(a){o(a)}},c=i=>i.done?e(i.value):Promise.resolve(i.value).then(d,u);c((s=s.apply(r,n)).next())});var C={};h(C,{CosmosExtension:()=>m});var g=require("@magic-sdk/commons");var m=class extends g.Extension.Internal{constructor(n){super();this.cosmosConfig=n;this.name="cosmos";this.config={};this.signAndBroadcast=(n,s)=>t(this,null,function*(){return this.request({id:42,jsonrpc:"2.0",method:"cos_signAndBroadcast",params:{message:n,fee:s}})});this.sign=(n,s)=>t(this,null,function*(){return this.request({id:42,jsonrpc:"2.0",method:"cos_sign",params:{message:n,fee:s}})});this.sendTokens=(n,s,e,o)=>t(this,null,function*(){return this.request({id:42,jsonrpc:"2.0",method:"cos_sendTokens",params:{recipientAddress:n,transferAmount:s,denom:e,memo:o}})});this.config={rpcUrl:n.rpcUrl,chainType:"COSMOS"}}};module.exports=x(C);
|
|
2
2
|
//# sourceMappingURL=index.native.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
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"
|
|
5
|
-
"mappings": "
|
|
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"],
|
|
5
|
+
"mappings": "2tBAAA,4CAA0B,8BAGnB,mBAA8B,aAAU,QAAwB,CAIrE,YAAmB,EAA4B,CAC7C,QADiB,oBAHnB,UAAO,SACP,YAAc,GAWP,sBAAmB,CAAO,EAAc,IAAa,wBAC1D,MAAO,MAAK,QAAQ,CAClB,GAAI,GACJ,QAAS,MACT,OAAQ,uBACR,OAAQ,CAAE,UAAS,WAIhB,UAAO,CAAO,EAAc,IAAa,wBAC9C,MAAO,MAAK,QAAQ,CAClB,GAAI,GACJ,QAAS,MACT,OAAQ,WACR,OAAQ,CAAE,UAAS,WAIhB,gBAAa,CAClB,EACA,EACA,EACA,IACG,wBACH,MAAO,MAAK,QAAQ,CAClB,GAAI,GACJ,QAAS,MACT,OAAQ,iBACR,OAAQ,CAAE,mBAAkB,iBAAgB,QAAO,YAlCrD,KAAK,OAAS,CACZ,OAAQ,EAAa,OACrB,UAAW",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { CosmosExtension } from './index';
|
|
2
|
-
export
|
|
2
|
+
export default CosmosExtension;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@magic-ext/cosmos",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.1",
|
|
4
4
|
"description": "magic cosmos extension",
|
|
5
5
|
"author": "Magic <team@magic.link> (https://magic.link/)",
|
|
6
6
|
"license": "MIT",
|
|
@@ -30,5 +30,5 @@
|
|
|
30
30
|
"devDependencies": {
|
|
31
31
|
"@magic-sdk/commons": "^4.0.0"
|
|
32
32
|
},
|
|
33
|
-
"gitHead": "
|
|
33
|
+
"gitHead": "d438b0b289fd4dd06a19bbb0f9f8d27bb067cea0"
|
|
34
34
|
}
|