@magic-ext/polkadot 8.0.0 → 8.2.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@magic-ext/polkadot",
3
- "version": "8.0.0",
3
+ "version": "8.2.0",
4
4
  "description": "magic polkadot 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": "^9.0.0"
31
+ "@magic-sdk/commons": "^9.2.0"
32
32
  },
33
- "gitHead": "4f0dd0871531afe5db7b966ec2ab502943cf8679"
33
+ "gitHead": "1c4c72cf1354c6177c3764144bd121a051a2f0c1"
34
34
  }
@@ -1,2 +0,0 @@
1
- "use strict";var s=Object.defineProperty;var a=Object.getOwnPropertyDescriptor;var m=Object.getOwnPropertyNames;var u=Object.prototype.hasOwnProperty;var d=(o,r)=>{for(var t in r)s(o,t,{get:r[t],enumerable:!0})},l=(o,r,t,e)=>{if(r&&typeof r=="object"||typeof r=="function")for(let n of m(r))!u.call(o,n)&&n!==t&&s(o,n,{get:()=>r[n],enumerable:!(e=a(r,n))||e.enumerable});return o};var g=o=>l(s({},"__esModule",{value:!0}),o);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.name="polkadot";this.sendTransaction=(t,e)=>this.request({id:42,jsonrpc:"2.0",method:"pdt_sendTransaction",params:{to:t,value:e}});this.contractCall=(t,e,n,p)=>this.request({id:42,jsonrpc:"2.0",method:"pdt_contractCall",params:{contractAddress:t,value:e,maxGas:n,data:p}});this.getAccount=()=>this.request({id:42,jsonrpc:"2.0",method:"pdt_getAccount",params:[]});this.config={rpcUrl:t.rpcUrl,chainType:"POLKADOT"}}};
2
- //# sourceMappingURL=index.native.js.map
@@ -1,7 +0,0 @@
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 { 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,GCAA,IAAAI,EAA0B,8BAGbC,EAAN,cAAgC,YAAU,QAAqC,CAKpF,YAAmBC,EAAgC,CACjD,MAAM,EADW,oBAAAA,EAJnB,UAAO,WAaP,KAAO,gBAAkB,CAACC,EAAYC,IAC7B,KAAK,QAAQ,CAClB,GAAI,GACJ,QAAS,MACT,OAAQ,sBACR,OAAQ,CAAE,GAAAD,EAAI,MAAAC,CAAM,CACtB,CAAC,EAGH,KAAO,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,EAGH,KAAO,WAAa,IACX,KAAK,QAAQ,CAClB,GAAI,GACJ,QAAS,MACT,OAAQ,iBACR,OAAQ,CAAC,CACX,CAAC,EA9BD,KAAK,OAAS,CACZ,OAAQL,EAAe,OACvB,UAAW,UACb,CACF,CA4BF",
6
- "names": ["index_native_exports", "__export", "PolkadotExtension", "__toCommonJS", "import_commons", "PolkadotExtension", "polkadotConfig", "to", "value", "contractAddress", "maxGas", "data"]
7
- }