@magic-ext/polkadot 25.0.0-canary.915.17279636506.0 → 25.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.
- 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 +1 -1
- package/dist/types/index.d.ts +4 -3
- package/package.json +4 -4
package/dist/cjs/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";var e=Object.defineProperty;var p=Object.getOwnPropertyDescriptor;var
|
|
1
|
+
"use strict";var e=Object.defineProperty;var p=Object.getOwnPropertyDescriptor;var m=Object.getOwnPropertyNames;var u=Object.prototype.hasOwnProperty;var d=(n,r)=>{for(var t in r)e(n,t,{get:r[t],enumerable:!0})},l=(n,r,t,s)=>{if(r&&typeof r=="object"||typeof r=="function")for(let o of m(r))!u.call(n,o)&&o!==t&&e(n,o,{get:()=>r[o],enumerable:!(s=p(r,o))||s.enumerable});return n};var g=n=>l(e({},"__esModule",{value:!0}),n);var f={};d(f,{PolkadotExtension:()=>i});module.exports=g(f);var c=require("@magic-sdk/commons"),i=class extends c.Extension.Internal{constructor(t){super();this.polkadotConfig=t;this.config={rpcUrl:t.rpcUrl,chainType:"POLKADOT"}}name="polkadot";config;sendTransaction=(t,s)=>this.request({id:42,jsonrpc:"2.0",method:"pdt_sendTransaction",params:{to:t,value:s}});contractCall=(t,s,o,a)=>this.request({id:42,jsonrpc:"2.0",method:"pdt_contractCall",params:{contractAddress:t,value:s,maxGas:o,data:a}});getAccount=()=>this.request({id:42,jsonrpc:"2.0",method:"pdt_getAccount",params:[]})};
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
package/dist/cjs/index.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/index.ts"],
|
|
4
|
-
"sourcesContent": ["import {
|
|
5
|
-
"mappings": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,uBAAAE,IAAA,eAAAC,EAAAH,GAAA,IAAAI,
|
|
6
|
-
"names": ["index_exports", "__export", "PolkadotExtension", "__toCommonJS", "
|
|
4
|
+
"sourcesContent": ["import { Extension } from '@magic-sdk/commons';\nimport { PolkadotConfig, ConfigType } from './type';\n\nexport class PolkadotExtension extends Extension.Internal<'polkadot', PolkadotConfig> {\n name = 'polkadot' as const;\n\n config: ConfigType;\n\n constructor(public polkadotConfig: PolkadotConfig) {\n super();\n\n this.config = {\n rpcUrl: polkadotConfig.rpcUrl,\n chainType: 'POLKADOT',\n };\n }\n\n public sendTransaction = (to: string, value: number): Promise<string> => {\n return this.request({\n id: 42,\n jsonrpc: '2.0',\n method: 'pdt_sendTransaction',\n params: { to, value },\n });\n };\n\n public contractCall = (contractAddress: string, value: number, maxGas: number, data: any): Promise<string> => {\n return this.request({\n id: 42,\n jsonrpc: '2.0',\n method: 'pdt_contractCall',\n params: { contractAddress, value, maxGas, data },\n });\n };\n\n public getAccount = (): Promise<string> => {\n return this.request({\n id: 42,\n jsonrpc: '2.0',\n method: 'pdt_getAccount',\n params: [],\n });\n };\n}\n"],
|
|
5
|
+
"mappings": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,uBAAAE,IAAA,eAAAC,EAAAH,GAAA,IAAAI,EAA0B,8BAGbF,EAAN,cAAgC,YAAU,QAAqC,CAKpF,YAAmBG,EAAgC,CACjD,MAAM,EADW,oBAAAA,EAGjB,KAAK,OAAS,CACZ,OAAQA,EAAe,OACvB,UAAW,UACb,CACF,CAXA,KAAO,WAEP,OAWO,gBAAkB,CAACC,EAAYC,IAC7B,KAAK,QAAQ,CAClB,GAAI,GACJ,QAAS,MACT,OAAQ,sBACR,OAAQ,CAAE,GAAAD,EAAI,MAAAC,CAAM,CACtB,CAAC,EAGI,aAAe,CAACC,EAAyBD,EAAeE,EAAgBC,IACtE,KAAK,QAAQ,CAClB,GAAI,GACJ,QAAS,MACT,OAAQ,mBACR,OAAQ,CAAE,gBAAAF,EAAiB,MAAAD,EAAO,OAAAE,EAAQ,KAAAC,CAAK,CACjD,CAAC,EAGI,WAAa,IACX,KAAK,QAAQ,CAClB,GAAI,GACJ,QAAS,MACT,OAAQ,iBACR,OAAQ,CAAC,CACX,CAAC,CAEL",
|
|
6
|
+
"names": ["index_exports", "__export", "PolkadotExtension", "__toCommonJS", "import_commons", "polkadotConfig", "to", "value", "contractAddress", "maxGas", "data"]
|
|
7
7
|
}
|
package/dist/es/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{Extension as e}from"@magic-sdk/commons";var n=class extends e.Internal{constructor(r){super();this.polkadotConfig=r;this.config={rpcUrl:r.rpcUrl,chainType:"POLKADOT"}}name="polkadot";config;sendTransaction=(r,t)=>this.request({id:42,jsonrpc:"2.0",method:"pdt_sendTransaction",params:{to:r,value:t}});contractCall=(r,t,o,s)=>this.request({id:42,jsonrpc:"2.0",method:"pdt_contractCall",params:{contractAddress:r,value:t,maxGas:o,data:s}});getAccount=()=>this.request({id:42,jsonrpc:"2.0",method:"pdt_getAccount",params:[]})};export{n as PolkadotExtension};
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
package/dist/es/index.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/index.ts"],
|
|
4
|
-
"sourcesContent": ["import {
|
|
5
|
-
"mappings": "AAAA,OAAS,
|
|
6
|
-
"names": ["
|
|
4
|
+
"sourcesContent": ["import { Extension } from '@magic-sdk/commons';\nimport { PolkadotConfig, ConfigType } from './type';\n\nexport class PolkadotExtension extends Extension.Internal<'polkadot', PolkadotConfig> {\n name = 'polkadot' as const;\n\n config: ConfigType;\n\n constructor(public polkadotConfig: PolkadotConfig) {\n super();\n\n this.config = {\n rpcUrl: polkadotConfig.rpcUrl,\n chainType: 'POLKADOT',\n };\n }\n\n public sendTransaction = (to: string, value: number): Promise<string> => {\n return this.request({\n id: 42,\n jsonrpc: '2.0',\n method: 'pdt_sendTransaction',\n params: { to, value },\n });\n };\n\n public contractCall = (contractAddress: string, value: number, maxGas: number, data: any): Promise<string> => {\n return this.request({\n id: 42,\n jsonrpc: '2.0',\n method: 'pdt_contractCall',\n params: { contractAddress, value, maxGas, data },\n });\n };\n\n public getAccount = (): Promise<string> => {\n return this.request({\n id: 42,\n jsonrpc: '2.0',\n method: 'pdt_getAccount',\n params: [],\n });\n };\n}\n"],
|
|
5
|
+
"mappings": "AAAA,OAAS,aAAAA,MAAiB,qBAGnB,IAAMC,EAAN,cAAgCD,EAAU,QAAqC,CAKpF,YAAmBE,EAAgC,CACjD,MAAM,EADW,oBAAAA,EAGjB,KAAK,OAAS,CACZ,OAAQA,EAAe,OACvB,UAAW,UACb,CACF,CAXA,KAAO,WAEP,OAWO,gBAAkB,CAACC,EAAYC,IAC7B,KAAK,QAAQ,CAClB,GAAI,GACJ,QAAS,MACT,OAAQ,sBACR,OAAQ,CAAE,GAAAD,EAAI,MAAAC,CAAM,CACtB,CAAC,EAGI,aAAe,CAACC,EAAyBD,EAAeE,EAAgBC,IACtE,KAAK,QAAQ,CAClB,GAAI,GACJ,QAAS,MACT,OAAQ,mBACR,OAAQ,CAAE,gBAAAF,EAAiB,MAAAD,EAAO,OAAAE,EAAQ,KAAAC,CAAK,CACjD,CAAC,EAGI,WAAa,IACX,KAAK,QAAQ,CAClB,GAAI,GACJ,QAAS,MACT,OAAQ,iBACR,OAAQ,CAAC,CACX,CAAC,CAEL",
|
|
6
|
+
"names": ["Extension", "PolkadotExtension", "polkadotConfig", "to", "value", "contractAddress", "maxGas", "data"]
|
|
7
7
|
}
|
package/dist/es/index.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{Extension as e}from"@magic-sdk/commons";var n=class extends e.Internal{constructor(r){super();this.polkadotConfig=r;this.config={rpcUrl:r.rpcUrl,chainType:"POLKADOT"}}name="polkadot";config;sendTransaction=(r,t)=>this.request({id:42,jsonrpc:"2.0",method:"pdt_sendTransaction",params:{to:r,value:t}});contractCall=(r,t,o,s)=>this.request({id:42,jsonrpc:"2.0",method:"pdt_contractCall",params:{contractAddress:r,value:t,maxGas:o,data:s}});getAccount=()=>this.request({id:42,jsonrpc:"2.0",method:"pdt_getAccount",params:[]})};export{n as PolkadotExtension};
|
|
2
2
|
//# sourceMappingURL=index.mjs.map
|
package/dist/es/index.mjs.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/index.ts"],
|
|
4
|
-
"sourcesContent": ["import {
|
|
5
|
-
"mappings": "AAAA,OAAS,
|
|
6
|
-
"names": ["
|
|
4
|
+
"sourcesContent": ["import { Extension } from '@magic-sdk/commons';\nimport { PolkadotConfig, ConfigType } from './type';\n\nexport class PolkadotExtension extends Extension.Internal<'polkadot', PolkadotConfig> {\n name = 'polkadot' as const;\n\n config: ConfigType;\n\n constructor(public polkadotConfig: PolkadotConfig) {\n super();\n\n this.config = {\n rpcUrl: polkadotConfig.rpcUrl,\n chainType: 'POLKADOT',\n };\n }\n\n public sendTransaction = (to: string, value: number): Promise<string> => {\n return this.request({\n id: 42,\n jsonrpc: '2.0',\n method: 'pdt_sendTransaction',\n params: { to, value },\n });\n };\n\n public contractCall = (contractAddress: string, value: number, maxGas: number, data: any): Promise<string> => {\n return this.request({\n id: 42,\n jsonrpc: '2.0',\n method: 'pdt_contractCall',\n params: { contractAddress, value, maxGas, data },\n });\n };\n\n public getAccount = (): Promise<string> => {\n return this.request({\n id: 42,\n jsonrpc: '2.0',\n method: 'pdt_getAccount',\n params: [],\n });\n };\n}\n"],
|
|
5
|
+
"mappings": "AAAA,OAAS,aAAAA,MAAiB,qBAGnB,IAAMC,EAAN,cAAgCD,EAAU,QAAqC,CAKpF,YAAmBE,EAAgC,CACjD,MAAM,EADW,oBAAAA,EAGjB,KAAK,OAAS,CACZ,OAAQA,EAAe,OACvB,UAAW,UACb,CACF,CAXA,KAAO,WAEP,OAWO,gBAAkB,CAACC,EAAYC,IAC7B,KAAK,QAAQ,CAClB,GAAI,GACJ,QAAS,MACT,OAAQ,sBACR,OAAQ,CAAE,GAAAD,EAAI,MAAAC,CAAM,CACtB,CAAC,EAGI,aAAe,CAACC,EAAyBD,EAAeE,EAAgBC,IACtE,KAAK,QAAQ,CAClB,GAAI,GACJ,QAAS,MACT,OAAQ,mBACR,OAAQ,CAAE,gBAAAF,EAAiB,MAAAD,EAAO,OAAAE,EAAQ,KAAAC,CAAK,CACjD,CAAC,EAGI,WAAa,IACX,KAAK,QAAQ,CAClB,GAAI,GACJ,QAAS,MACT,OAAQ,iBACR,OAAQ,CAAC,CACX,CAAC,CAEL",
|
|
6
|
+
"names": ["Extension", "PolkadotExtension", "polkadotConfig", "to", "value", "contractAddress", "maxGas", "data"]
|
|
7
7
|
}
|
package/dist/extension.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";var MagicPolkadotExtension=(()=>{var
|
|
1
|
+
"use strict";var MagicPolkadotExtension=(()=>{var l=Object.create;var i=Object.defineProperty;var u=Object.getOwnPropertyDescriptor;var g=Object.getOwnPropertyNames;var f=Object.getPrototypeOf,h=Object.prototype.hasOwnProperty;var b=(t,r)=>()=>(r||t((r={exports:{}}).exports,r),r.exports),C=(t,r)=>{for(var o in r)i(t,o,{get:r[o],enumerable:!0})},a=(t,r,o,e)=>{if(r&&typeof r=="object"||typeof r=="function")for(let n of g(r))!h.call(t,n)&&n!==o&&i(t,n,{get:()=>r[n],enumerable:!(e=u(r,n))||e.enumerable});return t};var P=(t,r,o)=>(o=t!=null?l(f(t)):{},a(r||!t||!t.__esModule?i(o,"default",{value:t,enumerable:!0}):o,t)),T=t=>a(i({},"__esModule",{value:!0}),t);var p=b((j,c)=>{"use strict";c.exports=Magic});var x={};C(x,{default:()=>k});var m=P(p()),s=class extends m.Extension.Internal{constructor(o){super();this.polkadotConfig=o;this.config={rpcUrl:o.rpcUrl,chainType:"POLKADOT"}}name="polkadot";config;sendTransaction=(o,e)=>this.request({id:42,jsonrpc:"2.0",method:"pdt_sendTransaction",params:{to:o,value:e}});contractCall=(o,e,n,d)=>this.request({id:42,jsonrpc:"2.0",method:"pdt_contractCall",params:{contractAddress:o,value:e,maxGas:n,data:d}});getAccount=()=>this.request({id:42,jsonrpc:"2.0",method:"pdt_getAccount",params:[]})};var k=s;return T(x);})();
|
|
2
2
|
if (MagicPolkadotExtension && MagicPolkadotExtension.default != null) { MagicPolkadotExtension = Object.assign(MagicPolkadotExtension.default, MagicPolkadotExtension); delete MagicPolkadotExtension.default; }
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { PolkadotConfig } from './type';
|
|
3
|
-
export declare class PolkadotExtension extends
|
|
1
|
+
import { Extension } from '@magic-sdk/commons';
|
|
2
|
+
import { PolkadotConfig, ConfigType } from './type';
|
|
3
|
+
export declare class PolkadotExtension extends Extension.Internal<'polkadot', PolkadotConfig> {
|
|
4
4
|
polkadotConfig: PolkadotConfig;
|
|
5
5
|
name: "polkadot";
|
|
6
|
+
config: ConfigType;
|
|
6
7
|
constructor(polkadotConfig: PolkadotConfig);
|
|
7
8
|
sendTransaction: (to: string, value: number) => Promise<string>;
|
|
8
9
|
contractCall: (contractAddress: string, value: number, maxGas: number, data: any) => Promise<string>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@magic-ext/polkadot",
|
|
3
|
-
"version": "25.0.0
|
|
3
|
+
"version": "25.0.0",
|
|
4
4
|
"description": "magic polkadot extension",
|
|
5
5
|
"author": "Magic <team@magic.link> (https://magic.link/)",
|
|
6
6
|
"license": "MIT",
|
|
@@ -24,11 +24,11 @@
|
|
|
24
24
|
},
|
|
25
25
|
"externals": {
|
|
26
26
|
"include": [
|
|
27
|
-
"@magic-sdk/
|
|
27
|
+
"@magic-sdk/commons"
|
|
28
28
|
]
|
|
29
29
|
},
|
|
30
30
|
"devDependencies": {
|
|
31
|
-
"@magic-sdk/
|
|
31
|
+
"@magic-sdk/commons": "^26.0.0"
|
|
32
32
|
},
|
|
33
|
-
"gitHead": "
|
|
33
|
+
"gitHead": "be1e437bcade3e4c5f5186509b7faab7c33d03a0"
|
|
34
34
|
}
|