@magic-ext/harmony 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/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 +9 -9
- package/dist/types/index.native.d.ts +1 -0
- package/dist/types/types.d.ts +8 -8
- package/package.json +5 -5
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 l=Object.create;var a=Object.defineProperty;var T=Object.getOwnPropertyDescriptor;var x=Object.getOwnPropertyNames;var d=Object.getPrototypeOf,H=Object.prototype.hasOwnProperty;var m=n=>a(n,"__esModule",{value:!0});var I=(n,r)=>{m(n);for(var i in r)a(n,i,{get:r[i],enumerable:!0})},R=(n,r,i)=>{if(r&&typeof r=="object"||typeof r=="function")for(let s of x(r))!H.call(n,s)&&s!=="default"&&a(n,s,{get:()=>r[s],enumerable:!(i=T(r,s))||i.enumerable});return n},U=n=>R(m(a(n!=null?l(d(n)):{},"default",n&&n.__esModule&&"default"in n?{get:()=>n.default,enumerable:!0}:{value:n,enumerable:!0})),n);var y=(n,r,i)=>new Promise((s,p)=>{var h=t=>{try{o(i.next(t))}catch(e){p(e)}},f=t=>{try{o(i.throw(t))}catch(e){p(e)}},o=t=>t.done?s(t.value):Promise.resolve(t.value).then(h,f);o((i=i.apply(n,r)).next())});I(exports,{HarmonyExtension:()=>u});var g=U(require("@magic-sdk/commons"));var c;(function(r){r.HarmonySignTransaction="hmy_sendTransaction"})(c||(c={}));var u=class extends g.Extension.Internal{constructor(r){super();this.harmonyConfig=r;this.name="harmony";this.config={};this.config={rpcUrl:r.rpcUrl,chainType:"HARMONY",options:{chainId:r.chainId}}}sendTransaction(r){return y(this,null,function*(){return this.request(this.utils.createJsonRpcRequestPayload(c.HarmonySignTransaction,r))})}};
|
|
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", "../../src/types.ts"],
|
|
4
|
+
"sourcesContent": ["import { Extension } from '@magic-sdk/commons';\nimport { HarmonyPayloadMethod, HarmonyConfig } from './types';\n\nexport class HarmonyExtension extends Extension.Internal<'harmony', any> {\n name = 'harmony' as const;\n config: any = {};\n\n constructor(public harmonyConfig: HarmonyConfig) {\n super();\n\n this.config = {\n rpcUrl: harmonyConfig.rpcUrl,\n chainType: 'HARMONY',\n options: {\n chainId: harmonyConfig.chainId,\n },\n };\n }\n\n public async sendTransaction(params: any) {\n return this.request(this.utils.createJsonRpcRequestPayload(HarmonyPayloadMethod.HarmonySignTransaction, params));\n }\n}\n", "export enum HarmonyPayloadMethod {\n HarmonySignTransaction = 'hmy_sendTransaction',\n}\n\nexport interface HarmonyConfig {\n rpcUrl: string;\n chainId: string;\n chainType: string;\n}\n"],
|
|
5
|
+
"mappings": "gyBAAA,0CAA0B,iCCAnB,GAAK,GAAL,UAAK,EAAL,CACL,yBAAyB,wBADf,WDGL,mBAA+B,aAAU,QAAyB,CAIvE,YAAmB,EAA8B,CAC/C,QADiB,qBAHnB,UAAO,UACP,YAAc,GAKZ,KAAK,OAAS,CACZ,OAAQ,EAAc,OACtB,UAAW,UACX,QAAS,CACP,QAAS,EAAc,UAKhB,gBAAgB,EAAa,gCACxC,MAAO,MAAK,QAAQ,KAAK,MAAM,4BAA4B,EAAqB,uBAAwB",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
package/dist/es/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
var e=(c,n,i)=>new Promise((p,o)=>{var m=r=>{try{t(i.next(r))}catch(a){o(a)}},y=r=>{try{t(i.throw(r))}catch(a){o(a)}},t=r=>r.done?p(r.value):Promise.resolve(r.value).then(m,y);t((i=i.apply(c,n)).next())});import{Extension as g}from"@magic-sdk/commons";var s;(function(n){n.HarmonySignTransaction="hmy_sendTransaction"})(s||(s={}));var u=class extends g.Internal{constructor(n){super();this.harmonyConfig=n;this.name="harmony";this.config={};this.config={rpcUrl:n.rpcUrl,chainType:"HARMONY",options:{chainId:n.chainId}}}sendTransaction(n){return e(this,null,function*(){return this.request(this.utils.createJsonRpcRequestPayload(s.HarmonySignTransaction,n))})}};export{u as HarmonyExtension};
|
|
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", "../../src/types.ts"],
|
|
4
|
+
"sourcesContent": ["import { Extension } from '@magic-sdk/commons';\nimport { HarmonyPayloadMethod, HarmonyConfig } from './types';\n\nexport class HarmonyExtension extends Extension.Internal<'harmony', any> {\n name = 'harmony' as const;\n config: any = {};\n\n constructor(public harmonyConfig: HarmonyConfig) {\n super();\n\n this.config = {\n rpcUrl: harmonyConfig.rpcUrl,\n chainType: 'HARMONY',\n options: {\n chainId: harmonyConfig.chainId,\n },\n };\n }\n\n public async sendTransaction(params: any) {\n return this.request(this.utils.createJsonRpcRequestPayload(HarmonyPayloadMethod.HarmonySignTransaction, params));\n }\n}\n", "export enum HarmonyPayloadMethod {\n HarmonySignTransaction = 'hmy_sendTransaction',\n}\n\nexport interface HarmonyConfig {\n rpcUrl: string;\n chainId: string;\n chainType: string;\n}\n"],
|
|
5
|
+
"mappings": "6MAAA,+CCAO,GAAK,GAAL,UAAK,EAAL,CACL,yBAAyB,wBADf,WDGL,mBAA+B,GAAU,QAAyB,CAIvE,YAAmB,EAA8B,CAC/C,QADiB,qBAHnB,UAAO,UACP,YAAc,GAKZ,KAAK,OAAS,CACZ,OAAQ,EAAc,OACtB,UAAW,UACX,QAAS,CACP,QAAS,EAAc,UAKhB,gBAAgB,EAAa,gCACxC,MAAO,MAAK,QAAQ,KAAK,MAAM,4BAA4B,EAAqB,uBAAwB",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
package/dist/extension.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var MagicHarmonyExtension=
|
|
1
|
+
var MagicHarmonyExtension=(()=>{var d=Object.create;var c=Object.defineProperty;var H=Object.getOwnPropertyDescriptor;var T=Object.getOwnPropertyNames;var I=Object.getPrototypeOf,E=Object.prototype.hasOwnProperty;var y=r=>c(r,"__esModule",{value:!0});var R=(r,n)=>()=>(n||r((n={exports:{}}).exports,n),n.exports);var U=(r,n,i)=>{if(n&&typeof n=="object"||typeof n=="function")for(let o of T(n))!E.call(r,o)&&o!=="default"&&c(r,o,{get:()=>n[o],enumerable:!(i=H(n,o))||i.enumerable});return r},b=r=>U(y(c(r!=null?d(I(r)):{},"default",r&&r.__esModule&&"default"in r?{get:()=>r.default,enumerable:!0}:{value:r,enumerable:!0})),r);var g=(r,n,i)=>new Promise((o,m)=>{var l=t=>{try{a(i.next(t))}catch(e){m(e)}},h=t=>{try{a(i.throw(t))}catch(e){m(e)}},a=t=>t.done?o(t.value):Promise.resolve(t.value).then(l,h);a((i=i.apply(r,n)).next())});var x=R((S,u)=>{u.exports=Magic});var q={};y(q);var f=b(x());var s;(function(n){n.HarmonySignTransaction="hmy_sendTransaction"})(s||(s={}));var p=class extends f.Extension.Internal{constructor(n){super();this.harmonyConfig=n;this.name="harmony";this.config={};this.config={rpcUrl:n.rpcUrl,chainType:"HARMONY",options:{chainId:n.chainId}}}sendTransaction(n){return g(this,null,function*(){return this.request(this.utils.createJsonRpcRequestPayload(s.HarmonySignTransaction,n))})}};module.exports=p;return q;})();
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var
|
|
1
|
+
var l=Object.create;var a=Object.defineProperty;var T=Object.getOwnPropertyDescriptor;var x=Object.getOwnPropertyNames;var d=Object.getPrototypeOf,H=Object.prototype.hasOwnProperty;var m=n=>a(n,"__esModule",{value:!0});var I=(n,r)=>{m(n);for(var i in r)a(n,i,{get:r[i],enumerable:!0})},R=(n,r,i)=>{if(r&&typeof r=="object"||typeof r=="function")for(let s of x(r))!H.call(n,s)&&s!=="default"&&a(n,s,{get:()=>r[s],enumerable:!(i=T(r,s))||i.enumerable});return n},U=n=>R(m(a(n!=null?l(d(n)):{},"default",n&&n.__esModule&&"default"in n?{get:()=>n.default,enumerable:!0}:{value:n,enumerable:!0})),n);var y=(n,r,i)=>new Promise((s,p)=>{var h=t=>{try{o(i.next(t))}catch(e){p(e)}},f=t=>{try{o(i.throw(t))}catch(e){p(e)}},o=t=>t.done?s(t.value):Promise.resolve(t.value).then(h,f);o((i=i.apply(n,r)).next())});I(exports,{HarmonyExtension:()=>u});var g=U(require("@magic-sdk/commons"));var c;(function(r){r.HarmonySignTransaction="hmy_sendTransaction"})(c||(c={}));var u=class extends g.Extension.Internal{constructor(r){super();this.harmonyConfig=r;this.name="harmony";this.config={};this.config={rpcUrl:r.rpcUrl,chainType:"HARMONY",options:{chainId:r.chainId}}}sendTransaction(r){return y(this,null,function*(){return this.request(this.utils.createJsonRpcRequestPayload(c.HarmonySignTransaction,r))})}};
|
|
2
2
|
//# sourceMappingURL=index.native.js.map
|
|
@@ -1 +1,7 @@
|
|
|
1
|
-
{
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/index.ts", "../../src/types.ts"],
|
|
4
|
+
"sourcesContent": ["import { Extension } from '@magic-sdk/commons';\nimport { HarmonyPayloadMethod, HarmonyConfig } from './types';\n\nexport class HarmonyExtension extends Extension.Internal<'harmony', any> {\n name = 'harmony' as const;\n config: any = {};\n\n constructor(public harmonyConfig: HarmonyConfig) {\n super();\n\n this.config = {\n rpcUrl: harmonyConfig.rpcUrl,\n chainType: 'HARMONY',\n options: {\n chainId: harmonyConfig.chainId,\n },\n };\n }\n\n public async sendTransaction(params: any) {\n return this.request(this.utils.createJsonRpcRequestPayload(HarmonyPayloadMethod.HarmonySignTransaction, params));\n }\n}\n", "export enum HarmonyPayloadMethod {\n HarmonySignTransaction = 'hmy_sendTransaction',\n}\n\nexport interface HarmonyConfig {\n rpcUrl: string;\n chainId: string;\n chainType: string;\n}\n"],
|
|
5
|
+
"mappings": "gyBAAA,0CAA0B,iCCAnB,GAAK,GAAL,UAAK,EAAL,CACL,yBAAyB,wBADf,WDGL,mBAA+B,aAAU,QAAyB,CAIvE,YAAmB,EAA8B,CAC/C,QADiB,qBAHnB,UAAO,UACP,YAAc,GAKZ,KAAK,OAAS,CACZ,OAAQ,EAAc,OACtB,UAAW,UACX,QAAS,CACP,QAAS,EAAc,UAKhB,gBAAgB,EAAa,gCACxC,MAAO,MAAK,QAAQ,KAAK,MAAM,4BAA4B,EAAqB,uBAAwB",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { HarmonyExtension } from './index';
|
|
2
|
-
export { HarmonyExtension as default };
|
|
1
|
+
import { HarmonyExtension } from './index';
|
|
2
|
+
export type { HarmonyExtension as default };
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { Extension } from '@magic-sdk/commons';
|
|
2
|
-
import { HarmonyConfig } from './types';
|
|
3
|
-
export declare class HarmonyExtension extends Extension.Internal<'harmony', any> {
|
|
4
|
-
harmonyConfig: HarmonyConfig;
|
|
5
|
-
name: "harmony";
|
|
6
|
-
config: any;
|
|
7
|
-
constructor(harmonyConfig: HarmonyConfig);
|
|
8
|
-
sendTransaction(params: any): Promise<any>;
|
|
9
|
-
}
|
|
1
|
+
import { Extension } from '@magic-sdk/commons';
|
|
2
|
+
import { HarmonyConfig } from './types';
|
|
3
|
+
export declare class HarmonyExtension extends Extension.Internal<'harmony', any> {
|
|
4
|
+
harmonyConfig: HarmonyConfig;
|
|
5
|
+
name: "harmony";
|
|
6
|
+
config: any;
|
|
7
|
+
constructor(harmonyConfig: HarmonyConfig);
|
|
8
|
+
sendTransaction(params: any): Promise<any>;
|
|
9
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './index';
|
package/dist/types/types.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
export declare enum HarmonyPayloadMethod {
|
|
2
|
-
HarmonySignTransaction = "hmy_sendTransaction"
|
|
3
|
-
}
|
|
4
|
-
export interface HarmonyConfig {
|
|
5
|
-
rpcUrl: string;
|
|
6
|
-
chainId: string;
|
|
7
|
-
chainType: string;
|
|
8
|
-
}
|
|
1
|
+
export declare enum HarmonyPayloadMethod {
|
|
2
|
+
HarmonySignTransaction = "hmy_sendTransaction"
|
|
3
|
+
}
|
|
4
|
+
export interface HarmonyConfig {
|
|
5
|
+
rpcUrl: string;
|
|
6
|
+
chainId: string;
|
|
7
|
+
chainType: string;
|
|
8
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@magic-ext/harmony",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.0.0",
|
|
4
4
|
"description": "magic harmony extension",
|
|
5
5
|
"author": "Magic <hello@magic.link> (https://magic.link/)",
|
|
6
6
|
"license": "MIT",
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
"dist/**/*.js.map",
|
|
14
14
|
"dist/**/*.d.ts"
|
|
15
15
|
],
|
|
16
|
-
"target": "
|
|
16
|
+
"target": "neutral",
|
|
17
17
|
"cdnGlobalName": "MagicHarmonyExtension",
|
|
18
18
|
"main": "./dist/cjs/index.js",
|
|
19
19
|
"module": "./dist/es/index.js",
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"jsdelivr": "./dist/extension.js",
|
|
22
22
|
"react-native": "./dist/react-native/index.native.js",
|
|
23
23
|
"exports": {
|
|
24
|
-
"import": "./dist/
|
|
24
|
+
"import": "./dist/es/index.mjs",
|
|
25
25
|
"require": "./dist/cjs/index.js"
|
|
26
26
|
},
|
|
27
27
|
"externals": {
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
]
|
|
31
31
|
},
|
|
32
32
|
"devDependencies": {
|
|
33
|
-
"@magic-sdk/commons": "^
|
|
33
|
+
"@magic-sdk/commons": "^4.0.0"
|
|
34
34
|
},
|
|
35
|
-
"gitHead": "
|
|
35
|
+
"gitHead": "5a1afc093cfec98bdcfb232cb2878510014da70a"
|
|
36
36
|
}
|