@magic-ext/zilliqa 2.0.0 → 3.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/CHANGELOG.md +19 -0
- package/dist/cjs/index.js +1 -1
- package/dist/cjs/index.js.map +7 -1
- package/dist/es/index.js +1 -1
- package/dist/es/index.js.map +7 -1
- package/dist/es/index.mjs +2 -0
- package/dist/es/index.mjs.map +7 -0
- package/dist/extension.js +1 -1
- package/dist/react-native/index.native.js +1 -1
- package/dist/react-native/index.native.js.map +7 -1
- package/dist/types/index.cdn.d.ts +2 -2
- package/dist/types/index.d.ts +16 -16
- package/dist/types/index.native.d.ts +1 -0
- package/dist/types/type.d.ts +7 -0
- package/package.json +5 -5
- package/dist/modern/index.mjs +0 -2
- package/dist/modern/index.mjs.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,22 @@
|
|
|
1
|
+
# v3.0.0 (Tue Jan 25 2022)
|
|
2
|
+
|
|
3
|
+
#### 💥 Breaking Change
|
|
4
|
+
|
|
5
|
+
- Switch from `microbundle` to `esbuild` [#220](https://github.com/magiclabs/magic-js/pull/220) ([@smithki](https://github.com/smithki))
|
|
6
|
+
|
|
7
|
+
#### 🐛 Bug Fix
|
|
8
|
+
|
|
9
|
+
- Merge with master ([@smithki](https://github.com/smithki))
|
|
10
|
+
- Merge branch 'master' into feat/faster-builds ([@smithki](https://github.com/smithki))
|
|
11
|
+
- Modify CDN default exports ([@smithki](https://github.com/smithki))
|
|
12
|
+
- Support newly added Magic JS extensions in ESBuild ([@smithki](https://github.com/smithki))
|
|
13
|
+
|
|
14
|
+
#### Authors: 1
|
|
15
|
+
|
|
16
|
+
- Ian K Smith ([@smithki](https://github.com/smithki))
|
|
17
|
+
|
|
18
|
+
---
|
|
19
|
+
|
|
1
20
|
# v1.0.0 (Thu Dec 09 2021)
|
|
2
21
|
|
|
3
22
|
#### 💥 Breaking Change
|
package/dist/cjs/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var
|
|
1
|
+
var y=Object.create;var e=Object.defineProperty;var P=Object.getOwnPropertyDescriptor;var L=Object.getOwnPropertyNames;var d=Object.getPrototypeOf,b=Object.prototype.hasOwnProperty;var r=n=>e(n,"__esModule",{value:!0});var h=(n,t)=>{r(n);for(var o in t)e(n,o,{get:t[o],enumerable:!0})},m=(n,t,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of L(t))!b.call(n,i)&&i!=="default"&&e(n,i,{get:()=>t[i],enumerable:!(o=P(t,i))||o.enumerable});return n},q=n=>m(r(e(n!=null?y(d(n)):{},"default",n&&n.__esModule&&"default"in n?{get:()=>n.default,enumerable:!0}:{value:n,enumerable:!0})),n);h(exports,{ZilliqaExtension:()=>s});var u=q(require("@magic-sdk/commons")),s=class extends u.Extension.Internal{constructor(t){super();this.zilliqaConfig=t;this.name="zilliqa";this.sendTransaction=(t,o)=>(t.amount&&(t.amount=typeof t.amount=="string"?t.amount:t.amount.toString()),t.gasPrice&&(t.gasPrice=typeof t.gasPrice=="string"?t.gasPrice:t.gasPrice.toString()),t.gasLimit&&(t.gasLimit=typeof t.gasLimit=="string"?t.gasLimit:t.gasLimit.toNumber()),this.request({id:42,method:"zil_sendTransaction",jsonrpc:"2.0",params:{params:t,toDs:o}}));this.deployContract=(t,o,i,g,c,l)=>(i.amount&&(i.amount=typeof i.amount=="string"?i.amount:i.amount.toString()),i.gasPrice&&(i.gasPrice=typeof i.gasPrice=="string"?i.gasPrice:i.gasPrice.toString()),i.gasLimit&&(i.gasLimit=typeof i.gasLimit=="string"?i.gasLimit:i.gasLimit.toNumber()),this.request({id:42,jsonrpc:"2.0",method:"zil_deployContract",params:{init:t,code:o,params:i,attempts:g,interval:c,toDs:l}}));this.callContract=(t,o,i,g=33,c=1e3,l=!1,f)=>(i.amount&&(i.amount=typeof i.amount=="string"?i.amount:i.amount.toString()),i.gasPrice&&(i.gasPrice=typeof i.gasPrice=="string"?i.gasPrice:i.gasPrice.toString()),i.gasLimit&&(i.gasLimit=typeof i.gasLimit=="string"?i.gasLimit:i.gasLimit.toNumber()),this.request({id:42,jsonrpc:"2.0",method:"zil_callContract",params:{transition:t,args:o,params:i,attempts:g,interval:c,toDs:l,contractAddress:f}}));this.getWallet=()=>this.request({id:42,jsonrpc:"2.0",method:"zil_getWallet",params:[]});this.config={rpcUrl:t.rpcUrl,chainType:"ZILLIQA"}}};
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
package/dist/cjs/index.js.map
CHANGED
|
@@ -1 +1,7 @@
|
|
|
1
|
-
{
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/index.ts"],
|
|
4
|
+
"sourcesContent": ["/* eslint-disable no-param-reassign */\nimport { Extension } from '@magic-sdk/commons';\nimport { ZilliqaConfig, ConfigType } from './type';\n\nexport class ZilliqaExtension extends Extension.Internal<'zilliqa', ZilliqaConfig> {\n name = 'zilliqa' as const;\n\n config: ConfigType;\n\n constructor(public zilliqaConfig: ZilliqaConfig) {\n super();\n\n this.config = {\n rpcUrl: zilliqaConfig.rpcUrl,\n chainType: 'ZILLIQA',\n };\n }\n\n public sendTransaction = (params: any, toDs: boolean): Promise<any> => {\n if (params.amount) params.amount = typeof params.amount === 'string' ? params.amount : params.amount.toString();\n if (params.gasPrice)\n params.gasPrice = typeof params.gasPrice === 'string' ? params.gasPrice : params.gasPrice.toString();\n if (params.gasLimit)\n params.gasLimit = typeof params.gasLimit === 'string' ? params.gasLimit : params.gasLimit.toNumber();\n\n return this.request({\n id: 42,\n method: 'zil_sendTransaction',\n jsonrpc: '2.0',\n params: {\n params,\n toDs,\n },\n });\n };\n\n public deployContract = (\n init: any,\n code: string,\n params: any,\n attempts: number,\n interval: number,\n toDs: boolean,\n ): Promise<any> => {\n if (params.amount) params.amount = typeof params.amount === 'string' ? params.amount : params.amount.toString();\n if (params.gasPrice)\n params.gasPrice = typeof params.gasPrice === 'string' ? params.gasPrice : params.gasPrice.toString();\n if (params.gasLimit)\n params.gasLimit = typeof params.gasLimit === 'string' ? params.gasLimit : params.gasLimit.toNumber();\n\n return this.request({\n id: 42,\n jsonrpc: '2.0',\n method: 'zil_deployContract',\n params: {\n init,\n code,\n params,\n attempts,\n interval,\n toDs,\n },\n });\n };\n\n public callContract = (\n transition: string,\n args: any[],\n params: any,\n attempts = 33,\n interval = 1000,\n toDs = false,\n contractAddress: string,\n ) => {\n if (params.amount) params.amount = typeof params.amount === 'string' ? params.amount : params.amount.toString();\n if (params.gasPrice)\n params.gasPrice = typeof params.gasPrice === 'string' ? params.gasPrice : params.gasPrice.toString();\n if (params.gasLimit)\n params.gasLimit = typeof params.gasLimit === 'string' ? params.gasLimit : params.gasLimit.toNumber();\n\n return this.request({\n id: 42,\n jsonrpc: '2.0',\n method: 'zil_callContract',\n params: {\n transition,\n args,\n params,\n attempts,\n interval,\n toDs,\n contractAddress,\n },\n });\n };\n\n public getWallet = (): Promise<object> => {\n return this.request({\n id: 42,\n jsonrpc: '2.0',\n method: 'zil_getWallet',\n params: [],\n });\n };\n}\n"],
|
|
5
|
+
"mappings": "mlBAAA,oCACA,MAA0B,iCAGnB,eAA+B,aAAU,QAAmC,CAKjF,YAAmB,EAA8B,CAC/C,QADiB,qBAJnB,UAAO,UAaA,qBAAkB,CAAC,EAAa,IACjC,GAAO,QAAQ,GAAO,OAAS,MAAO,GAAO,QAAW,SAAW,EAAO,OAAS,EAAO,OAAO,YACjG,EAAO,UACT,GAAO,SAAW,MAAO,GAAO,UAAa,SAAW,EAAO,SAAW,EAAO,SAAS,YACxF,EAAO,UACT,GAAO,SAAW,MAAO,GAAO,UAAa,SAAW,EAAO,SAAW,EAAO,SAAS,YAErF,KAAK,QAAQ,CAClB,GAAI,GACJ,OAAQ,sBACR,QAAS,MACT,OAAQ,CACN,SACA,WAKC,oBAAiB,CACtB,EACA,EACA,EACA,EACA,EACA,IAEI,GAAO,QAAQ,GAAO,OAAS,MAAO,GAAO,QAAW,SAAW,EAAO,OAAS,EAAO,OAAO,YACjG,EAAO,UACT,GAAO,SAAW,MAAO,GAAO,UAAa,SAAW,EAAO,SAAW,EAAO,SAAS,YACxF,EAAO,UACT,GAAO,SAAW,MAAO,GAAO,UAAa,SAAW,EAAO,SAAW,EAAO,SAAS,YAErF,KAAK,QAAQ,CAClB,GAAI,GACJ,QAAS,MACT,OAAQ,qBACR,OAAQ,CACN,OACA,OACA,SACA,WACA,WACA,WAKC,kBAAe,CACpB,EACA,EACA,EACA,EAAW,GACX,EAAW,IACX,EAAO,GACP,IAEI,GAAO,QAAQ,GAAO,OAAS,MAAO,GAAO,QAAW,SAAW,EAAO,OAAS,EAAO,OAAO,YACjG,EAAO,UACT,GAAO,SAAW,MAAO,GAAO,UAAa,SAAW,EAAO,SAAW,EAAO,SAAS,YACxF,EAAO,UACT,GAAO,SAAW,MAAO,GAAO,UAAa,SAAW,EAAO,SAAW,EAAO,SAAS,YAErF,KAAK,QAAQ,CAClB,GAAI,GACJ,QAAS,MACT,OAAQ,mBACR,OAAQ,CACN,aACA,OACA,SACA,WACA,WACA,OACA,sBAKC,eAAY,IACV,KAAK,QAAQ,CAClB,GAAI,GACJ,QAAS,MACT,OAAQ,gBACR,OAAQ,KAzFV,KAAK,OAAS,CACZ,OAAQ,EAAc,OACtB,UAAW",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
package/dist/es/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{Extension as
|
|
1
|
+
import{Extension as l}from"@magic-sdk/commons";var r=class extends l.Internal{constructor(t){super();this.zilliqaConfig=t;this.name="zilliqa";this.sendTransaction=(t,n)=>(t.amount&&(t.amount=typeof t.amount=="string"?t.amount:t.amount.toString()),t.gasPrice&&(t.gasPrice=typeof t.gasPrice=="string"?t.gasPrice:t.gasPrice.toString()),t.gasLimit&&(t.gasLimit=typeof t.gasLimit=="string"?t.gasLimit:t.gasLimit.toNumber()),this.request({id:42,method:"zil_sendTransaction",jsonrpc:"2.0",params:{params:t,toDs:n}}));this.deployContract=(t,n,i,o,e,g)=>(i.amount&&(i.amount=typeof i.amount=="string"?i.amount:i.amount.toString()),i.gasPrice&&(i.gasPrice=typeof i.gasPrice=="string"?i.gasPrice:i.gasPrice.toString()),i.gasLimit&&(i.gasLimit=typeof i.gasLimit=="string"?i.gasLimit:i.gasLimit.toNumber()),this.request({id:42,jsonrpc:"2.0",method:"zil_deployContract",params:{init:t,code:n,params:i,attempts:o,interval:e,toDs:g}}));this.callContract=(t,n,i,o=33,e=1e3,g=!1,c)=>(i.amount&&(i.amount=typeof i.amount=="string"?i.amount:i.amount.toString()),i.gasPrice&&(i.gasPrice=typeof i.gasPrice=="string"?i.gasPrice:i.gasPrice.toString()),i.gasLimit&&(i.gasLimit=typeof i.gasLimit=="string"?i.gasLimit:i.gasLimit.toNumber()),this.request({id:42,jsonrpc:"2.0",method:"zil_callContract",params:{transition:t,args:n,params:i,attempts:o,interval:e,toDs:g,contractAddress:c}}));this.getWallet=()=>this.request({id:42,jsonrpc:"2.0",method:"zil_getWallet",params:[]});this.config={rpcUrl:t.rpcUrl,chainType:"ZILLIQA"}}};export{r as ZilliqaExtension};
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
package/dist/es/index.js.map
CHANGED
|
@@ -1 +1,7 @@
|
|
|
1
|
-
{
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/index.ts"],
|
|
4
|
+
"sourcesContent": ["/* eslint-disable no-param-reassign */\nimport { Extension } from '@magic-sdk/commons';\nimport { ZilliqaConfig, ConfigType } from './type';\n\nexport class ZilliqaExtension extends Extension.Internal<'zilliqa', ZilliqaConfig> {\n name = 'zilliqa' as const;\n\n config: ConfigType;\n\n constructor(public zilliqaConfig: ZilliqaConfig) {\n super();\n\n this.config = {\n rpcUrl: zilliqaConfig.rpcUrl,\n chainType: 'ZILLIQA',\n };\n }\n\n public sendTransaction = (params: any, toDs: boolean): Promise<any> => {\n if (params.amount) params.amount = typeof params.amount === 'string' ? params.amount : params.amount.toString();\n if (params.gasPrice)\n params.gasPrice = typeof params.gasPrice === 'string' ? params.gasPrice : params.gasPrice.toString();\n if (params.gasLimit)\n params.gasLimit = typeof params.gasLimit === 'string' ? params.gasLimit : params.gasLimit.toNumber();\n\n return this.request({\n id: 42,\n method: 'zil_sendTransaction',\n jsonrpc: '2.0',\n params: {\n params,\n toDs,\n },\n });\n };\n\n public deployContract = (\n init: any,\n code: string,\n params: any,\n attempts: number,\n interval: number,\n toDs: boolean,\n ): Promise<any> => {\n if (params.amount) params.amount = typeof params.amount === 'string' ? params.amount : params.amount.toString();\n if (params.gasPrice)\n params.gasPrice = typeof params.gasPrice === 'string' ? params.gasPrice : params.gasPrice.toString();\n if (params.gasLimit)\n params.gasLimit = typeof params.gasLimit === 'string' ? params.gasLimit : params.gasLimit.toNumber();\n\n return this.request({\n id: 42,\n jsonrpc: '2.0',\n method: 'zil_deployContract',\n params: {\n init,\n code,\n params,\n attempts,\n interval,\n toDs,\n },\n });\n };\n\n public callContract = (\n transition: string,\n args: any[],\n params: any,\n attempts = 33,\n interval = 1000,\n toDs = false,\n contractAddress: string,\n ) => {\n if (params.amount) params.amount = typeof params.amount === 'string' ? params.amount : params.amount.toString();\n if (params.gasPrice)\n params.gasPrice = typeof params.gasPrice === 'string' ? params.gasPrice : params.gasPrice.toString();\n if (params.gasLimit)\n params.gasLimit = typeof params.gasLimit === 'string' ? params.gasLimit : params.gasLimit.toNumber();\n\n return this.request({\n id: 42,\n jsonrpc: '2.0',\n method: 'zil_callContract',\n params: {\n transition,\n args,\n params,\n attempts,\n interval,\n toDs,\n contractAddress,\n },\n });\n };\n\n public getWallet = (): Promise<object> => {\n return this.request({\n id: 42,\n jsonrpc: '2.0',\n method: 'zil_getWallet',\n params: [],\n });\n };\n}\n"],
|
|
5
|
+
"mappings": "AACA,+CAGO,mBAA+B,GAAU,QAAmC,CAKjF,YAAmB,EAA8B,CAC/C,QADiB,qBAJnB,UAAO,UAaA,qBAAkB,CAAC,EAAa,IACjC,GAAO,QAAQ,GAAO,OAAS,MAAO,GAAO,QAAW,SAAW,EAAO,OAAS,EAAO,OAAO,YACjG,EAAO,UACT,GAAO,SAAW,MAAO,GAAO,UAAa,SAAW,EAAO,SAAW,EAAO,SAAS,YACxF,EAAO,UACT,GAAO,SAAW,MAAO,GAAO,UAAa,SAAW,EAAO,SAAW,EAAO,SAAS,YAErF,KAAK,QAAQ,CAClB,GAAI,GACJ,OAAQ,sBACR,QAAS,MACT,OAAQ,CACN,SACA,WAKC,oBAAiB,CACtB,EACA,EACA,EACA,EACA,EACA,IAEI,GAAO,QAAQ,GAAO,OAAS,MAAO,GAAO,QAAW,SAAW,EAAO,OAAS,EAAO,OAAO,YACjG,EAAO,UACT,GAAO,SAAW,MAAO,GAAO,UAAa,SAAW,EAAO,SAAW,EAAO,SAAS,YACxF,EAAO,UACT,GAAO,SAAW,MAAO,GAAO,UAAa,SAAW,EAAO,SAAW,EAAO,SAAS,YAErF,KAAK,QAAQ,CAClB,GAAI,GACJ,QAAS,MACT,OAAQ,qBACR,OAAQ,CACN,OACA,OACA,SACA,WACA,WACA,WAKC,kBAAe,CACpB,EACA,EACA,EACA,EAAW,GACX,EAAW,IACX,EAAO,GACP,IAEI,GAAO,QAAQ,GAAO,OAAS,MAAO,GAAO,QAAW,SAAW,EAAO,OAAS,EAAO,OAAO,YACjG,EAAO,UACT,GAAO,SAAW,MAAO,GAAO,UAAa,SAAW,EAAO,SAAW,EAAO,SAAS,YACxF,EAAO,UACT,GAAO,SAAW,MAAO,GAAO,UAAa,SAAW,EAAO,SAAW,EAAO,SAAS,YAErF,KAAK,QAAQ,CAClB,GAAI,GACJ,QAAS,MACT,OAAQ,mBACR,OAAQ,CACN,aACA,OACA,SACA,WACA,WACA,OACA,sBAKC,eAAY,IACV,KAAK,QAAQ,CAClB,GAAI,GACJ,QAAS,MACT,OAAQ,gBACR,OAAQ,KAzFV,KAAK,OAAS,CACZ,OAAQ,EAAc,OACtB,UAAW",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{Extension as l}from"@magic-sdk/commons";var r=class extends l.Internal{constructor(t){super();this.zilliqaConfig=t;this.name="zilliqa";this.sendTransaction=(t,n)=>(t.amount&&(t.amount=typeof t.amount=="string"?t.amount:t.amount.toString()),t.gasPrice&&(t.gasPrice=typeof t.gasPrice=="string"?t.gasPrice:t.gasPrice.toString()),t.gasLimit&&(t.gasLimit=typeof t.gasLimit=="string"?t.gasLimit:t.gasLimit.toNumber()),this.request({id:42,method:"zil_sendTransaction",jsonrpc:"2.0",params:{params:t,toDs:n}}));this.deployContract=(t,n,i,o,e,g)=>(i.amount&&(i.amount=typeof i.amount=="string"?i.amount:i.amount.toString()),i.gasPrice&&(i.gasPrice=typeof i.gasPrice=="string"?i.gasPrice:i.gasPrice.toString()),i.gasLimit&&(i.gasLimit=typeof i.gasLimit=="string"?i.gasLimit:i.gasLimit.toNumber()),this.request({id:42,jsonrpc:"2.0",method:"zil_deployContract",params:{init:t,code:n,params:i,attempts:o,interval:e,toDs:g}}));this.callContract=(t,n,i,o=33,e=1e3,g=!1,c)=>(i.amount&&(i.amount=typeof i.amount=="string"?i.amount:i.amount.toString()),i.gasPrice&&(i.gasPrice=typeof i.gasPrice=="string"?i.gasPrice:i.gasPrice.toString()),i.gasLimit&&(i.gasLimit=typeof i.gasLimit=="string"?i.gasLimit:i.gasLimit.toNumber()),this.request({id:42,jsonrpc:"2.0",method:"zil_callContract",params:{transition:t,args:n,params:i,attempts:o,interval:e,toDs:g,contractAddress:c}}));this.getWallet=()=>this.request({id:42,jsonrpc:"2.0",method:"zil_getWallet",params:[]});this.config={rpcUrl:t.rpcUrl,chainType:"ZILLIQA"}}};export{r as ZilliqaExtension};
|
|
2
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/index.ts"],
|
|
4
|
+
"sourcesContent": ["/* eslint-disable no-param-reassign */\nimport { Extension } from '@magic-sdk/commons';\nimport { ZilliqaConfig, ConfigType } from './type';\n\nexport class ZilliqaExtension extends Extension.Internal<'zilliqa', ZilliqaConfig> {\n name = 'zilliqa' as const;\n\n config: ConfigType;\n\n constructor(public zilliqaConfig: ZilliqaConfig) {\n super();\n\n this.config = {\n rpcUrl: zilliqaConfig.rpcUrl,\n chainType: 'ZILLIQA',\n };\n }\n\n public sendTransaction = (params: any, toDs: boolean): Promise<any> => {\n if (params.amount) params.amount = typeof params.amount === 'string' ? params.amount : params.amount.toString();\n if (params.gasPrice)\n params.gasPrice = typeof params.gasPrice === 'string' ? params.gasPrice : params.gasPrice.toString();\n if (params.gasLimit)\n params.gasLimit = typeof params.gasLimit === 'string' ? params.gasLimit : params.gasLimit.toNumber();\n\n return this.request({\n id: 42,\n method: 'zil_sendTransaction',\n jsonrpc: '2.0',\n params: {\n params,\n toDs,\n },\n });\n };\n\n public deployContract = (\n init: any,\n code: string,\n params: any,\n attempts: number,\n interval: number,\n toDs: boolean,\n ): Promise<any> => {\n if (params.amount) params.amount = typeof params.amount === 'string' ? params.amount : params.amount.toString();\n if (params.gasPrice)\n params.gasPrice = typeof params.gasPrice === 'string' ? params.gasPrice : params.gasPrice.toString();\n if (params.gasLimit)\n params.gasLimit = typeof params.gasLimit === 'string' ? params.gasLimit : params.gasLimit.toNumber();\n\n return this.request({\n id: 42,\n jsonrpc: '2.0',\n method: 'zil_deployContract',\n params: {\n init,\n code,\n params,\n attempts,\n interval,\n toDs,\n },\n });\n };\n\n public callContract = (\n transition: string,\n args: any[],\n params: any,\n attempts = 33,\n interval = 1000,\n toDs = false,\n contractAddress: string,\n ) => {\n if (params.amount) params.amount = typeof params.amount === 'string' ? params.amount : params.amount.toString();\n if (params.gasPrice)\n params.gasPrice = typeof params.gasPrice === 'string' ? params.gasPrice : params.gasPrice.toString();\n if (params.gasLimit)\n params.gasLimit = typeof params.gasLimit === 'string' ? params.gasLimit : params.gasLimit.toNumber();\n\n return this.request({\n id: 42,\n jsonrpc: '2.0',\n method: 'zil_callContract',\n params: {\n transition,\n args,\n params,\n attempts,\n interval,\n toDs,\n contractAddress,\n },\n });\n };\n\n public getWallet = (): Promise<object> => {\n return this.request({\n id: 42,\n jsonrpc: '2.0',\n method: 'zil_getWallet',\n params: [],\n });\n };\n}\n"],
|
|
5
|
+
"mappings": "AACA,+CAGO,mBAA+B,GAAU,QAAmC,CAKjF,YAAmB,EAA8B,CAC/C,QADiB,qBAJnB,UAAO,UAaA,qBAAkB,CAAC,EAAa,IACjC,GAAO,QAAQ,GAAO,OAAS,MAAO,GAAO,QAAW,SAAW,EAAO,OAAS,EAAO,OAAO,YACjG,EAAO,UACT,GAAO,SAAW,MAAO,GAAO,UAAa,SAAW,EAAO,SAAW,EAAO,SAAS,YACxF,EAAO,UACT,GAAO,SAAW,MAAO,GAAO,UAAa,SAAW,EAAO,SAAW,EAAO,SAAS,YAErF,KAAK,QAAQ,CAClB,GAAI,GACJ,OAAQ,sBACR,QAAS,MACT,OAAQ,CACN,SACA,WAKC,oBAAiB,CACtB,EACA,EACA,EACA,EACA,EACA,IAEI,GAAO,QAAQ,GAAO,OAAS,MAAO,GAAO,QAAW,SAAW,EAAO,OAAS,EAAO,OAAO,YACjG,EAAO,UACT,GAAO,SAAW,MAAO,GAAO,UAAa,SAAW,EAAO,SAAW,EAAO,SAAS,YACxF,EAAO,UACT,GAAO,SAAW,MAAO,GAAO,UAAa,SAAW,EAAO,SAAW,EAAO,SAAS,YAErF,KAAK,QAAQ,CAClB,GAAI,GACJ,QAAS,MACT,OAAQ,qBACR,OAAQ,CACN,OACA,OACA,SACA,WACA,WACA,WAKC,kBAAe,CACpB,EACA,EACA,EACA,EAAW,GACX,EAAW,IACX,EAAO,GACP,IAEI,GAAO,QAAQ,GAAO,OAAS,MAAO,GAAO,QAAW,SAAW,EAAO,OAAS,EAAO,OAAO,YACjG,EAAO,UACT,GAAO,SAAW,MAAO,GAAO,UAAa,SAAW,EAAO,SAAW,EAAO,SAAS,YACxF,EAAO,UACT,GAAO,SAAW,MAAO,GAAO,UAAa,SAAW,EAAO,SAAW,EAAO,SAAS,YAErF,KAAK,QAAQ,CAClB,GAAI,GACJ,QAAS,MACT,OAAQ,mBACR,OAAQ,CACN,aACA,OACA,SACA,WACA,WACA,OACA,sBAKC,eAAY,IACV,KAAK,QAAQ,CAClB,GAAI,GACJ,QAAS,MACT,OAAQ,gBACR,OAAQ,KAzFV,KAAK,OAAS,CACZ,OAAQ,EAAc,OACtB,UAAW",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
package/dist/extension.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var MagicZilliqaExtension=
|
|
1
|
+
var MagicZilliqaExtension=(()=>{var d=Object.create;var l=Object.defineProperty;var L=Object.getOwnPropertyDescriptor;var b=Object.getOwnPropertyNames;var m=Object.getPrototypeOf,q=Object.prototype.hasOwnProperty;var s=n=>l(n,"__esModule",{value:!0});var h=(n,t)=>()=>(t||n((t={exports:{}}).exports,t),t.exports);var x=(n,t,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of b(t))!q.call(n,i)&&i!=="default"&&l(n,i,{get:()=>t[i],enumerable:!(o=L(t,i))||o.enumerable});return n},C=n=>x(s(l(n!=null?d(m(n)):{},"default",n&&n.__esModule&&"default"in n?{get:()=>n.default,enumerable:!0}:{value:n,enumerable:!0})),n);var f=h((Z,u)=>{u.exports=Magic});var z={};s(z);var y=C(f()),r=class extends y.Extension.Internal{constructor(t){super();this.zilliqaConfig=t;this.name="zilliqa";this.sendTransaction=(t,o)=>(t.amount&&(t.amount=typeof t.amount=="string"?t.amount:t.amount.toString()),t.gasPrice&&(t.gasPrice=typeof t.gasPrice=="string"?t.gasPrice:t.gasPrice.toString()),t.gasLimit&&(t.gasLimit=typeof t.gasLimit=="string"?t.gasLimit:t.gasLimit.toNumber()),this.request({id:42,method:"zil_sendTransaction",jsonrpc:"2.0",params:{params:t,toDs:o}}));this.deployContract=(t,o,i,e,g,c)=>(i.amount&&(i.amount=typeof i.amount=="string"?i.amount:i.amount.toString()),i.gasPrice&&(i.gasPrice=typeof i.gasPrice=="string"?i.gasPrice:i.gasPrice.toString()),i.gasLimit&&(i.gasLimit=typeof i.gasLimit=="string"?i.gasLimit:i.gasLimit.toNumber()),this.request({id:42,jsonrpc:"2.0",method:"zil_deployContract",params:{init:t,code:o,params:i,attempts:e,interval:g,toDs:c}}));this.callContract=(t,o,i,e=33,g=1e3,c=!1,P)=>(i.amount&&(i.amount=typeof i.amount=="string"?i.amount:i.amount.toString()),i.gasPrice&&(i.gasPrice=typeof i.gasPrice=="string"?i.gasPrice:i.gasPrice.toString()),i.gasLimit&&(i.gasLimit=typeof i.gasLimit=="string"?i.gasLimit:i.gasLimit.toNumber()),this.request({id:42,jsonrpc:"2.0",method:"zil_callContract",params:{transition:t,args:o,params:i,attempts:e,interval:g,toDs:c,contractAddress:P}}));this.getWallet=()=>this.request({id:42,jsonrpc:"2.0",method:"zil_getWallet",params:[]});this.config={rpcUrl:t.rpcUrl,chainType:"ZILLIQA"}}};module.exports=r;return z;})();
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var
|
|
1
|
+
var y=Object.create;var e=Object.defineProperty;var P=Object.getOwnPropertyDescriptor;var L=Object.getOwnPropertyNames;var d=Object.getPrototypeOf,b=Object.prototype.hasOwnProperty;var r=n=>e(n,"__esModule",{value:!0});var h=(n,t)=>{r(n);for(var o in t)e(n,o,{get:t[o],enumerable:!0})},m=(n,t,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of L(t))!b.call(n,i)&&i!=="default"&&e(n,i,{get:()=>t[i],enumerable:!(o=P(t,i))||o.enumerable});return n},q=n=>m(r(e(n!=null?y(d(n)):{},"default",n&&n.__esModule&&"default"in n?{get:()=>n.default,enumerable:!0}:{value:n,enumerable:!0})),n);h(exports,{ZilliqaExtension:()=>s});var u=q(require("@magic-sdk/commons")),s=class extends u.Extension.Internal{constructor(t){super();this.zilliqaConfig=t;this.name="zilliqa";this.sendTransaction=(t,o)=>(t.amount&&(t.amount=typeof t.amount=="string"?t.amount:t.amount.toString()),t.gasPrice&&(t.gasPrice=typeof t.gasPrice=="string"?t.gasPrice:t.gasPrice.toString()),t.gasLimit&&(t.gasLimit=typeof t.gasLimit=="string"?t.gasLimit:t.gasLimit.toNumber()),this.request({id:42,method:"zil_sendTransaction",jsonrpc:"2.0",params:{params:t,toDs:o}}));this.deployContract=(t,o,i,g,c,l)=>(i.amount&&(i.amount=typeof i.amount=="string"?i.amount:i.amount.toString()),i.gasPrice&&(i.gasPrice=typeof i.gasPrice=="string"?i.gasPrice:i.gasPrice.toString()),i.gasLimit&&(i.gasLimit=typeof i.gasLimit=="string"?i.gasLimit:i.gasLimit.toNumber()),this.request({id:42,jsonrpc:"2.0",method:"zil_deployContract",params:{init:t,code:o,params:i,attempts:g,interval:c,toDs:l}}));this.callContract=(t,o,i,g=33,c=1e3,l=!1,f)=>(i.amount&&(i.amount=typeof i.amount=="string"?i.amount:i.amount.toString()),i.gasPrice&&(i.gasPrice=typeof i.gasPrice=="string"?i.gasPrice:i.gasPrice.toString()),i.gasLimit&&(i.gasLimit=typeof i.gasLimit=="string"?i.gasLimit:i.gasLimit.toNumber()),this.request({id:42,jsonrpc:"2.0",method:"zil_callContract",params:{transition:t,args:o,params:i,attempts:g,interval:c,toDs:l,contractAddress:f}}));this.getWallet=()=>this.request({id:42,jsonrpc:"2.0",method:"zil_getWallet",params:[]});this.config={rpcUrl:t.rpcUrl,chainType:"ZILLIQA"}}};
|
|
2
2
|
//# sourceMappingURL=index.native.js.map
|
|
@@ -1 +1,7 @@
|
|
|
1
|
-
{
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/index.ts"],
|
|
4
|
+
"sourcesContent": ["/* eslint-disable no-param-reassign */\nimport { Extension } from '@magic-sdk/commons';\nimport { ZilliqaConfig, ConfigType } from './type';\n\nexport class ZilliqaExtension extends Extension.Internal<'zilliqa', ZilliqaConfig> {\n name = 'zilliqa' as const;\n\n config: ConfigType;\n\n constructor(public zilliqaConfig: ZilliqaConfig) {\n super();\n\n this.config = {\n rpcUrl: zilliqaConfig.rpcUrl,\n chainType: 'ZILLIQA',\n };\n }\n\n public sendTransaction = (params: any, toDs: boolean): Promise<any> => {\n if (params.amount) params.amount = typeof params.amount === 'string' ? params.amount : params.amount.toString();\n if (params.gasPrice)\n params.gasPrice = typeof params.gasPrice === 'string' ? params.gasPrice : params.gasPrice.toString();\n if (params.gasLimit)\n params.gasLimit = typeof params.gasLimit === 'string' ? params.gasLimit : params.gasLimit.toNumber();\n\n return this.request({\n id: 42,\n method: 'zil_sendTransaction',\n jsonrpc: '2.0',\n params: {\n params,\n toDs,\n },\n });\n };\n\n public deployContract = (\n init: any,\n code: string,\n params: any,\n attempts: number,\n interval: number,\n toDs: boolean,\n ): Promise<any> => {\n if (params.amount) params.amount = typeof params.amount === 'string' ? params.amount : params.amount.toString();\n if (params.gasPrice)\n params.gasPrice = typeof params.gasPrice === 'string' ? params.gasPrice : params.gasPrice.toString();\n if (params.gasLimit)\n params.gasLimit = typeof params.gasLimit === 'string' ? params.gasLimit : params.gasLimit.toNumber();\n\n return this.request({\n id: 42,\n jsonrpc: '2.0',\n method: 'zil_deployContract',\n params: {\n init,\n code,\n params,\n attempts,\n interval,\n toDs,\n },\n });\n };\n\n public callContract = (\n transition: string,\n args: any[],\n params: any,\n attempts = 33,\n interval = 1000,\n toDs = false,\n contractAddress: string,\n ) => {\n if (params.amount) params.amount = typeof params.amount === 'string' ? params.amount : params.amount.toString();\n if (params.gasPrice)\n params.gasPrice = typeof params.gasPrice === 'string' ? params.gasPrice : params.gasPrice.toString();\n if (params.gasLimit)\n params.gasLimit = typeof params.gasLimit === 'string' ? params.gasLimit : params.gasLimit.toNumber();\n\n return this.request({\n id: 42,\n jsonrpc: '2.0',\n method: 'zil_callContract',\n params: {\n transition,\n args,\n params,\n attempts,\n interval,\n toDs,\n contractAddress,\n },\n });\n };\n\n public getWallet = (): Promise<object> => {\n return this.request({\n id: 42,\n jsonrpc: '2.0',\n method: 'zil_getWallet',\n params: [],\n });\n };\n}\n"],
|
|
5
|
+
"mappings": "mlBAAA,oCACA,MAA0B,iCAGnB,eAA+B,aAAU,QAAmC,CAKjF,YAAmB,EAA8B,CAC/C,QADiB,qBAJnB,UAAO,UAaA,qBAAkB,CAAC,EAAa,IACjC,GAAO,QAAQ,GAAO,OAAS,MAAO,GAAO,QAAW,SAAW,EAAO,OAAS,EAAO,OAAO,YACjG,EAAO,UACT,GAAO,SAAW,MAAO,GAAO,UAAa,SAAW,EAAO,SAAW,EAAO,SAAS,YACxF,EAAO,UACT,GAAO,SAAW,MAAO,GAAO,UAAa,SAAW,EAAO,SAAW,EAAO,SAAS,YAErF,KAAK,QAAQ,CAClB,GAAI,GACJ,OAAQ,sBACR,QAAS,MACT,OAAQ,CACN,SACA,WAKC,oBAAiB,CACtB,EACA,EACA,EACA,EACA,EACA,IAEI,GAAO,QAAQ,GAAO,OAAS,MAAO,GAAO,QAAW,SAAW,EAAO,OAAS,EAAO,OAAO,YACjG,EAAO,UACT,GAAO,SAAW,MAAO,GAAO,UAAa,SAAW,EAAO,SAAW,EAAO,SAAS,YACxF,EAAO,UACT,GAAO,SAAW,MAAO,GAAO,UAAa,SAAW,EAAO,SAAW,EAAO,SAAS,YAErF,KAAK,QAAQ,CAClB,GAAI,GACJ,QAAS,MACT,OAAQ,qBACR,OAAQ,CACN,OACA,OACA,SACA,WACA,WACA,WAKC,kBAAe,CACpB,EACA,EACA,EACA,EAAW,GACX,EAAW,IACX,EAAO,GACP,IAEI,GAAO,QAAQ,GAAO,OAAS,MAAO,GAAO,QAAW,SAAW,EAAO,OAAS,EAAO,OAAO,YACjG,EAAO,UACT,GAAO,SAAW,MAAO,GAAO,UAAa,SAAW,EAAO,SAAW,EAAO,SAAS,YACxF,EAAO,UACT,GAAO,SAAW,MAAO,GAAO,UAAa,SAAW,EAAO,SAAW,EAAO,SAAS,YAErF,KAAK,QAAQ,CAClB,GAAI,GACJ,QAAS,MACT,OAAQ,mBACR,OAAQ,CACN,aACA,OACA,SACA,WACA,WACA,OACA,sBAKC,eAAY,IACV,KAAK,QAAQ,CAClB,GAAI,GACJ,QAAS,MACT,OAAQ,gBACR,OAAQ,KAzFV,KAAK,OAAS,CACZ,OAAQ,EAAc,OACtB,UAAW",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { ZilliqaExtension } from './index';
|
|
2
|
-
export { ZilliqaExtension as default };
|
|
1
|
+
import { ZilliqaExtension } from './index';
|
|
2
|
+
export type { ZilliqaExtension as default };
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { Extension } from '@magic-sdk/commons';
|
|
2
|
-
import { ZilliqaConfig, ConfigType } from './type';
|
|
3
|
-
export declare class ZilliqaExtension extends Extension.Internal<'zilliqa', ZilliqaConfig> {
|
|
4
|
-
zilliqaConfig: ZilliqaConfig;
|
|
5
|
-
name: "zilliqa";
|
|
6
|
-
config: ConfigType;
|
|
7
|
-
constructor(zilliqaConfig: ZilliqaConfig);
|
|
8
|
-
sendTransaction: (params: any, toDs: boolean) => Promise<any>;
|
|
9
|
-
deployContract: (init: any, code: string, params: any, attempts: number, interval: number, toDs: boolean) => Promise<any>;
|
|
10
|
-
callContract: (transition: string, args: any[], params: any, attempts: number | undefined, interval: number | undefined, toDs: boolean | undefined, contractAddress: string) => import("@magic-sdk/commons").PromiEvent<any, {
|
|
11
|
-
done: (result: any) => void;
|
|
12
|
-
error: (reason: any) => void;
|
|
13
|
-
settled: () => void;
|
|
14
|
-
}>;
|
|
15
|
-
getWallet: () => Promise<object>;
|
|
16
|
-
}
|
|
1
|
+
import { Extension } from '@magic-sdk/commons';
|
|
2
|
+
import { ZilliqaConfig, ConfigType } from './type';
|
|
3
|
+
export declare class ZilliqaExtension extends Extension.Internal<'zilliqa', ZilliqaConfig> {
|
|
4
|
+
zilliqaConfig: ZilliqaConfig;
|
|
5
|
+
name: "zilliqa";
|
|
6
|
+
config: ConfigType;
|
|
7
|
+
constructor(zilliqaConfig: ZilliqaConfig);
|
|
8
|
+
sendTransaction: (params: any, toDs: boolean) => Promise<any>;
|
|
9
|
+
deployContract: (init: any, code: string, params: any, attempts: number, interval: number, toDs: boolean) => Promise<any>;
|
|
10
|
+
callContract: (transition: string, args: any[], params: any, attempts: number | undefined, interval: number | undefined, toDs: boolean | undefined, contractAddress: string) => import("@magic-sdk/commons").PromiEvent<any, {
|
|
11
|
+
done: (result: any) => void;
|
|
12
|
+
error: (reason: any) => void;
|
|
13
|
+
settled: () => void;
|
|
14
|
+
}>;
|
|
15
|
+
getWallet: () => Promise<object>;
|
|
16
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './index';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@magic-ext/zilliqa",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.0.0",
|
|
4
4
|
"description": "magic zilliqa extension",
|
|
5
5
|
"author": "Magic <team@magic.link> (https://magic.link/)",
|
|
6
6
|
"license": "MIT",
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"files": [
|
|
12
12
|
"dist"
|
|
13
13
|
],
|
|
14
|
-
"target": "
|
|
14
|
+
"target": "neutral",
|
|
15
15
|
"cdnGlobalName": "MagicZilliqaExtension",
|
|
16
16
|
"main": "./dist/cjs/index.js",
|
|
17
17
|
"module": "./dist/es/index.js",
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
"jsdelivr": "./dist/extension.js",
|
|
20
20
|
"react-native": "./dist/react-native/index.native.js",
|
|
21
21
|
"exports": {
|
|
22
|
-
"import": "./dist/
|
|
22
|
+
"import": "./dist/es/index.mjs",
|
|
23
23
|
"require": "./dist/cjs/index.js"
|
|
24
24
|
},
|
|
25
25
|
"externals": {
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
]
|
|
29
29
|
},
|
|
30
30
|
"devDependencies": {
|
|
31
|
-
"@magic-sdk/commons": "^
|
|
31
|
+
"@magic-sdk/commons": "^4.0.0"
|
|
32
32
|
},
|
|
33
|
-
"gitHead": "
|
|
33
|
+
"gitHead": "5a1afc093cfec98bdcfb232cb2878510014da70a"
|
|
34
34
|
}
|
package/dist/modern/index.mjs
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{Extension as t}from"@magic-sdk/commons";class i extends t.Internal{constructor(t){super(),this.zilliqaConfig=void 0,this.name="zilliqa",this.config=void 0,this.sendTransaction=(t,i)=>(t.amount&&(t.amount="string"==typeof t.amount?t.amount:t.amount.toString()),t.gasPrice&&(t.gasPrice="string"==typeof t.gasPrice?t.gasPrice:t.gasPrice.toString()),t.gasLimit&&(t.gasLimit="string"==typeof t.gasLimit?t.gasLimit:t.gasLimit.toNumber()),this.request({id:42,method:"zil_sendTransaction",jsonrpc:"2.0",params:{params:t,toDs:i}})),this.deployContract=(t,i,s,a,r,o)=>(s.amount&&(s.amount="string"==typeof s.amount?s.amount:s.amount.toString()),s.gasPrice&&(s.gasPrice="string"==typeof s.gasPrice?s.gasPrice:s.gasPrice.toString()),s.gasLimit&&(s.gasLimit="string"==typeof s.gasLimit?s.gasLimit:s.gasLimit.toNumber()),this.request({id:42,jsonrpc:"2.0",method:"zil_deployContract",params:{init:t,code:i,params:s,attempts:a,interval:r,toDs:o}})),this.callContract=(t,i,s,a=33,r=1e3,o=!1,e)=>(s.amount&&(s.amount="string"==typeof s.amount?s.amount:s.amount.toString()),s.gasPrice&&(s.gasPrice="string"==typeof s.gasPrice?s.gasPrice:s.gasPrice.toString()),s.gasLimit&&(s.gasLimit="string"==typeof s.gasLimit?s.gasLimit:s.gasLimit.toNumber()),this.request({id:42,jsonrpc:"2.0",method:"zil_callContract",params:{transition:t,args:i,params:s,attempts:a,interval:r,toDs:o,contractAddress:e}})),this.getWallet=()=>this.request({id:42,jsonrpc:"2.0",method:"zil_getWallet",params:[]}),this.zilliqaConfig=t,this.config={rpcUrl:t.rpcUrl,chainType:"ZILLIQA"}}}export{i as ZilliqaExtension};
|
|
2
|
-
//# sourceMappingURL=index.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sources":["../../src/index.ts"],"sourcesContent":["/* eslint-disable no-param-reassign */\nimport { Extension } from '@magic-sdk/commons';\nimport { ZilliqaConfig, ConfigType } from './type';\n\nexport class ZilliqaExtension extends Extension.Internal<'zilliqa', ZilliqaConfig> {\n name = 'zilliqa' as const;\n\n config: ConfigType;\n\n constructor(public zilliqaConfig: ZilliqaConfig) {\n super();\n\n this.config = {\n rpcUrl: zilliqaConfig.rpcUrl,\n chainType: 'ZILLIQA',\n };\n }\n\n public sendTransaction = (params: any, toDs: boolean): Promise<any> => {\n if (params.amount) params.amount = typeof params.amount === 'string' ? params.amount : params.amount.toString();\n if (params.gasPrice)\n params.gasPrice = typeof params.gasPrice === 'string' ? params.gasPrice : params.gasPrice.toString();\n if (params.gasLimit)\n params.gasLimit = typeof params.gasLimit === 'string' ? params.gasLimit : params.gasLimit.toNumber();\n\n return this.request({\n id: 42,\n method: 'zil_sendTransaction',\n jsonrpc: '2.0',\n params: {\n params,\n toDs,\n },\n });\n };\n\n public deployContract = (\n init: any,\n code: string,\n params: any,\n attempts: number,\n interval: number,\n toDs: boolean,\n ): Promise<any> => {\n if (params.amount) params.amount = typeof params.amount === 'string' ? params.amount : params.amount.toString();\n if (params.gasPrice)\n params.gasPrice = typeof params.gasPrice === 'string' ? params.gasPrice : params.gasPrice.toString();\n if (params.gasLimit)\n params.gasLimit = typeof params.gasLimit === 'string' ? params.gasLimit : params.gasLimit.toNumber();\n\n return this.request({\n id: 42,\n jsonrpc: '2.0',\n method: 'zil_deployContract',\n params: {\n init,\n code,\n params,\n attempts,\n interval,\n toDs,\n },\n });\n };\n\n public callContract = (\n transition: string,\n args: any[],\n params: any,\n attempts = 33,\n interval = 1000,\n toDs = false,\n contractAddress: string,\n ) => {\n if (params.amount) params.amount = typeof params.amount === 'string' ? params.amount : params.amount.toString();\n if (params.gasPrice)\n params.gasPrice = typeof params.gasPrice === 'string' ? params.gasPrice : params.gasPrice.toString();\n if (params.gasLimit)\n params.gasLimit = typeof params.gasLimit === 'string' ? params.gasLimit : params.gasLimit.toNumber();\n\n return this.request({\n id: 42,\n jsonrpc: '2.0',\n method: 'zil_callContract',\n params: {\n transition,\n args,\n params,\n attempts,\n interval,\n toDs,\n contractAddress,\n },\n });\n };\n\n public getWallet = (): Promise<object> => {\n return this.request({\n id: 42,\n jsonrpc: '2.0',\n method: 'zil_getWallet',\n params: [],\n });\n };\n}\n"],"names":["ZilliqaExtension","Extension","Internal","constructor","zilliqaConfig","super","name","config","sendTransaction","params","toDs","amount","toString","gasPrice","gasLimit","toNumber","request","id","method","jsonrpc","deployContract","init","code","attempts","interval","callContract","transition","args","contractAddress","getWallet","this","rpcUrl","chainType"],"mappings":"qDAIaA,UAAyBC,EAAUC,SAK9CC,YAAmBC,GACjBC,aADiBD,0BAJnBE,KAAO,eAEPC,mBAWOC,gBAAkB,CAACC,EAAaC,KACjCD,EAAOE,SAAQF,EAAOE,OAAkC,iBAAlBF,EAAOE,OAAsBF,EAAOE,OAASF,EAAOE,OAAOC,YACjGH,EAAOI,WACTJ,EAAOI,SAAsC,iBAApBJ,EAAOI,SAAwBJ,EAAOI,SAAWJ,EAAOI,SAASD,YACxFH,EAAOK,WACTL,EAAOK,SAAsC,iBAApBL,EAAOK,SAAwBL,EAAOK,SAAWL,EAAOK,SAASC,iBAEhFC,QAAQ,CAClBC,GAAI,GACJC,OAAQ,sBACRC,QAAS,MACTV,OAAQ,CACNA,OAAAA,EACAC,KAAAA,WAKCU,eAAiB,CACtBC,EACAC,EACAb,EACAc,EACAC,EACAd,KAEID,EAAOE,SAAQF,EAAOE,OAAkC,iBAAlBF,EAAOE,OAAsBF,EAAOE,OAASF,EAAOE,OAAOC,YACjGH,EAAOI,WACTJ,EAAOI,SAAsC,iBAApBJ,EAAOI,SAAwBJ,EAAOI,SAAWJ,EAAOI,SAASD,YACxFH,EAAOK,WACTL,EAAOK,SAAsC,iBAApBL,EAAOK,SAAwBL,EAAOK,SAAWL,EAAOK,SAASC,iBAEhFC,QAAQ,CAClBC,GAAI,GACJE,QAAS,MACTD,OAAQ,qBACRT,OAAQ,CACNY,KAAAA,EACAC,KAAAA,EACAb,OAAAA,EACAc,SAAAA,EACAC,SAAAA,EACAd,KAAAA,WAKCe,aAAe,CACpBC,EACAC,EACAlB,EACAc,EAAW,GACXC,EAAW,IACXd,GAAO,EACPkB,KAEInB,EAAOE,SAAQF,EAAOE,OAAkC,iBAAlBF,EAAOE,OAAsBF,EAAOE,OAASF,EAAOE,OAAOC,YACjGH,EAAOI,WACTJ,EAAOI,SAAsC,iBAApBJ,EAAOI,SAAwBJ,EAAOI,SAAWJ,EAAOI,SAASD,YACxFH,EAAOK,WACTL,EAAOK,SAAsC,iBAApBL,EAAOK,SAAwBL,EAAOK,SAAWL,EAAOK,SAASC,iBAEhFC,QAAQ,CAClBC,GAAI,GACJE,QAAS,MACTD,OAAQ,mBACRT,OAAQ,CACNiB,WAAAA,EACAC,KAAAA,EACAlB,OAAAA,EACAc,SAAAA,EACAC,SAAAA,EACAd,KAAAA,EACAkB,gBAAAA,WAKCC,UAAY,SACLb,QAAQ,CAClBC,GAAI,GACJE,QAAS,MACTD,OAAQ,gBACRT,OAAQ,KA5FOqB,mBAAA1B,EAGjB0B,KAAKvB,OAAS,CACZwB,OAAQ3B,EAAc2B,OACtBC,UAAW"}
|