@magic-ext/algorand 2.1.0 → 3.1.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 +60 -0
- package/LICENSE +21 -0
- package/README.md +3 -4
- package/dist/cjs/index.js +2 -106
- package/dist/cjs/index.js.map +7 -1
- package/dist/es/index.js +2 -103
- 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 +2 -1
- package/dist/react-native/index.native.js +2 -0
- package/dist/react-native/index.native.js.map +7 -0
- package/dist/{cjs → types}/index.cdn.d.ts +1 -1
- package/dist/{es → types}/index.d.ts +1 -1
- package/dist/types/index.native.d.ts +1 -0
- package/dist/{cjs → types}/types.d.ts +0 -0
- package/package.json +22 -39
- package/dist/cjs/index.cdn.js +0 -6
- package/dist/cjs/index.cdn.js.map +0 -1
- package/dist/cjs/index.d.ts +0 -13
- package/dist/cjs/types.js +0 -12
- package/dist/cjs/types.js.map +0 -1
- package/dist/es/index.cdn.d.ts +0 -2
- package/dist/es/index.cdn.js +0 -3
- package/dist/es/index.cdn.js.map +0 -1
- package/dist/es/types.d.ts +0 -14
- package/dist/es/types.js +0 -9
- package/dist/es/types.js.map +0 -1
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
# v3.1.0 (Mon Mar 07 2022)
|
|
2
|
+
|
|
3
|
+
#### 🐛 Bug Fix
|
|
4
|
+
|
|
5
|
+
- Update READMEs with outdated context/hyperlinks ([@smithki](https://github.com/smithki))
|
|
6
|
+
|
|
7
|
+
#### 🏠 Internal
|
|
8
|
+
|
|
9
|
+
- Internal documentation updates (`BUILD_SYSTEM.md`) [#283](https://github.com/magiclabs/magic-js/pull/283) ([@smithki](https://github.com/smithki))
|
|
10
|
+
|
|
11
|
+
#### Authors: 1
|
|
12
|
+
|
|
13
|
+
- Ian K Smith ([@smithki](https://github.com/smithki))
|
|
14
|
+
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
# v3.0.1 (Tue Jan 25 2022)
|
|
18
|
+
|
|
19
|
+
#### 🐛 Bug Fix
|
|
20
|
+
|
|
21
|
+
- Fix CDN build targets [#270](https://github.com/magiclabs/magic-js/pull/270) ([@smithki](https://github.com/smithki))
|
|
22
|
+
- Fix CDN issues related to ESBuild ([@smithki](https://github.com/smithki))
|
|
23
|
+
|
|
24
|
+
#### Authors: 1
|
|
25
|
+
|
|
26
|
+
- Ian K Smith ([@smithki](https://github.com/smithki))
|
|
27
|
+
|
|
28
|
+
---
|
|
29
|
+
|
|
30
|
+
# v3.0.0 (Tue Jan 25 2022)
|
|
31
|
+
|
|
32
|
+
#### 💥 Breaking Change
|
|
33
|
+
|
|
34
|
+
- Switch from `microbundle` to `esbuild` [#220](https://github.com/magiclabs/magic-js/pull/220) ([@smithki](https://github.com/smithki))
|
|
35
|
+
|
|
36
|
+
#### 🐛 Bug Fix
|
|
37
|
+
|
|
38
|
+
- Merge with master ([@smithki](https://github.com/smithki))
|
|
39
|
+
- Merge branch 'master' into feat/faster-builds ([@smithki](https://github.com/smithki))
|
|
40
|
+
- Modify CDN default exports ([@smithki](https://github.com/smithki))
|
|
41
|
+
- Support newly added Magic JS extensions in ESBuild ([@smithki](https://github.com/smithki))
|
|
42
|
+
|
|
43
|
+
#### Authors: 1
|
|
44
|
+
|
|
45
|
+
- Ian K Smith ([@smithki](https://github.com/smithki))
|
|
46
|
+
|
|
47
|
+
---
|
|
48
|
+
|
|
49
|
+
# v1.0.0 (Fri Dec 10 2021)
|
|
50
|
+
|
|
51
|
+
#### 💥 Breaking Change
|
|
52
|
+
|
|
53
|
+
- Jerryliu sc 44386 migrate web3 related magic ext repos to magic part 2 [#251](https://github.com/magiclabs/magic-js/pull/251) ([@Ethella](https://github.com/Ethella))
|
|
54
|
+
|
|
55
|
+
#### Authors: 1
|
|
56
|
+
|
|
57
|
+
- Jerry Liu ([@Ethella](https://github.com/Ethella))
|
|
58
|
+
|
|
59
|
+
---
|
|
60
|
+
|
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2018-present Magic Labs, Inc.
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -32,7 +32,7 @@ const magic = new Magic('YOUR_API_KEY', {
|
|
|
32
32
|
```
|
|
33
33
|
|
|
34
34
|
## Magic SDK
|
|
35
|
-
See the [developer documentation](https://
|
|
35
|
+
See the [developer documentation](https://magic.link/docs) to learn how you can master the Magic SDK in a matter of minutes.
|
|
36
36
|
|
|
37
37
|
|
|
38
38
|
## Usage
|
|
@@ -47,7 +47,7 @@ console.log('algorand public address', publicAddress);
|
|
|
47
47
|
|
|
48
48
|
### Sign Transaction
|
|
49
49
|
By passing txnObj instance to `magic.algorand.signTransaction()` method, it will automatically sign the transaction with current user and
|
|
50
|
-
|
|
50
|
+
generate transaction object including signature.
|
|
51
51
|
```js
|
|
52
52
|
const txn = {
|
|
53
53
|
"to": "7ZUECA7HFLZTXENRV24SHLU4AVPUTMTTDUFUBNBD64C73F3UHRTHAIOF6Q",
|
|
@@ -68,7 +68,7 @@ By passing txnObj instance to `magic.algorand.signTransaction()` method, it will
|
|
|
68
68
|
|
|
69
69
|
### Sign Bid
|
|
70
70
|
By passing txnObj instance to `magic.algorand.signBid()` method, it will automatically sign the bid with current user and
|
|
71
|
-
|
|
71
|
+
generate transaction object including signature.
|
|
72
72
|
```js
|
|
73
73
|
const bid = {
|
|
74
74
|
"bidderKey": "IB3NJALXLDX5JLYCD4TMTMLVCKDRZNS4JONHMIWD6XM7DSKYR7MWHI6I7U",
|
|
@@ -83,4 +83,3 @@ By passing txnObj instance to `magic.algorand.signBid()` method, it will automat
|
|
|
83
83
|
|
|
84
84
|
console.log('send bid', tx)
|
|
85
85
|
```
|
|
86
|
-
|
package/dist/cjs/index.js
CHANGED
|
@@ -1,106 +1,2 @@
|
|
|
1
|
-
"
|
|
2
|
-
|
|
3
|
-
var extendStatics = function (d, b) {
|
|
4
|
-
extendStatics = Object.setPrototypeOf ||
|
|
5
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
-
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
|
7
|
-
return extendStatics(d, b);
|
|
8
|
-
};
|
|
9
|
-
return function (d, b) {
|
|
10
|
-
extendStatics(d, b);
|
|
11
|
-
function __() { this.constructor = d; }
|
|
12
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
13
|
-
};
|
|
14
|
-
})();
|
|
15
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
16
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
17
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
18
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
19
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
20
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
21
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
22
|
-
});
|
|
23
|
-
};
|
|
24
|
-
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
25
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
26
|
-
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
27
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
28
|
-
function step(op) {
|
|
29
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
30
|
-
while (_) try {
|
|
31
|
-
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
32
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
33
|
-
switch (op[0]) {
|
|
34
|
-
case 0: case 1: t = op; break;
|
|
35
|
-
case 4: _.label++; return { value: op[1], done: false };
|
|
36
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
37
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
38
|
-
default:
|
|
39
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
40
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
41
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
42
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
43
|
-
if (t[2]) _.ops.pop();
|
|
44
|
-
_.trys.pop(); continue;
|
|
45
|
-
}
|
|
46
|
-
op = body.call(thisArg, _);
|
|
47
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
48
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
49
|
-
}
|
|
50
|
-
};
|
|
51
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
52
|
-
exports.AlgorandExtension = void 0;
|
|
53
|
-
var magic_sdk_1 = require("magic-sdk");
|
|
54
|
-
var types_1 = require("./types");
|
|
55
|
-
var AlgorandExtension = /** @class */ (function (_super) {
|
|
56
|
-
__extends(AlgorandExtension, _super);
|
|
57
|
-
function AlgorandExtension(algorandConfig) {
|
|
58
|
-
var _this = _super.call(this) || this;
|
|
59
|
-
_this.algorandConfig = algorandConfig;
|
|
60
|
-
_this.name = 'algod';
|
|
61
|
-
_this.config = {};
|
|
62
|
-
_this.config = {
|
|
63
|
-
rpcUrl: algorandConfig.rpcUrl,
|
|
64
|
-
chainType: 'ALOGD',
|
|
65
|
-
};
|
|
66
|
-
return _this;
|
|
67
|
-
}
|
|
68
|
-
AlgorandExtension.prototype.signTransaction = function (txn) {
|
|
69
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
70
|
-
return __generator(this, function (_a) {
|
|
71
|
-
return [2 /*return*/, this.request(this.utils.createJsonRpcRequestPayload(types_1.AlgorandPayloadMethod.AlgorandSignTransaction, txn))];
|
|
72
|
-
});
|
|
73
|
-
});
|
|
74
|
-
};
|
|
75
|
-
AlgorandExtension.prototype.signBid = function (txn) {
|
|
76
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
77
|
-
return __generator(this, function (_a) {
|
|
78
|
-
return [2 /*return*/, this.request(this.utils.createJsonRpcRequestPayload(types_1.AlgorandPayloadMethod.AlgorandSignBid, txn))];
|
|
79
|
-
});
|
|
80
|
-
});
|
|
81
|
-
};
|
|
82
|
-
AlgorandExtension.prototype.getWallet = function () {
|
|
83
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
84
|
-
return __generator(this, function (_a) {
|
|
85
|
-
return [2 /*return*/, this.request(this.utils.createJsonRpcRequestPayload(types_1.AlgorandPayloadMethod.AlgorandGetWallet, []))];
|
|
86
|
-
});
|
|
87
|
-
});
|
|
88
|
-
};
|
|
89
|
-
AlgorandExtension.prototype.signGroupTransaction = function (txns) {
|
|
90
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
91
|
-
return __generator(this, function (_a) {
|
|
92
|
-
return [2 /*return*/, this.request(this.utils.createJsonRpcRequestPayload(types_1.AlgorandPayloadMethod.AlgorandSignGroupTransaction, txns))];
|
|
93
|
-
});
|
|
94
|
-
});
|
|
95
|
-
};
|
|
96
|
-
AlgorandExtension.prototype.signGroupTransactionV2 = function (txns) {
|
|
97
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
98
|
-
return __generator(this, function (_a) {
|
|
99
|
-
return [2 /*return*/, this.request(this.utils.createJsonRpcRequestPayload(types_1.AlgorandPayloadMethod.AlgorandSignGroupTransactionV2, txns))];
|
|
100
|
-
});
|
|
101
|
-
});
|
|
102
|
-
};
|
|
103
|
-
return AlgorandExtension;
|
|
104
|
-
}(magic_sdk_1.Extension.Internal));
|
|
105
|
-
exports.AlgorandExtension = AlgorandExtension;
|
|
106
|
-
//# sourceMappingURL=index.js.map
|
|
1
|
+
var g=Object.defineProperty;var y=Object.getOwnPropertyDescriptor;var T=Object.getOwnPropertyNames;var G=Object.prototype.hasOwnProperty;var f=r=>g(r,"__esModule",{value:!0});var q=(r,n)=>{for(var a in n)g(r,a,{get:n[a],enumerable:!0})},A=(r,n,a,e)=>{if(n&&typeof n=="object"||typeof n=="function")for(let i of T(n))!G.call(r,i)&&(a||i!=="default")&&g(r,i,{get:()=>n[i],enumerable:!(e=y(n,i))||e.enumerable});return r};var R=(r=>(n,a)=>r&&r.get(n)||(a=A(f({}),n,1),r&&r.set(n,a),a))(typeof WeakMap!="undefined"?new WeakMap:0);var s=(r,n,a)=>new Promise((e,i)=>{var p=t=>{try{o(a.next(t))}catch(c){i(c)}},d=t=>{try{o(a.throw(t))}catch(c){i(c)}},o=t=>t.done?e(t.value):Promise.resolve(t.value).then(p,d);o((a=a.apply(r,n)).next())});var h={};q(h,{AlgorandExtension:()=>u});var l=require("@magic-sdk/commons");var u=class extends l.Extension.Internal{constructor(n){super();this.algorandConfig=n;this.name="algod";this.config={};this.config={rpcUrl:n.rpcUrl,chainType:"ALOGD"}}signTransaction(n){return s(this,null,function*(){return this.request(this.utils.createJsonRpcRequestPayload("algod_signTransaction",n))})}signBid(n){return s(this,null,function*(){return this.request(this.utils.createJsonRpcRequestPayload("algod_signBid",n))})}getWallet(){return s(this,null,function*(){return this.request(this.utils.createJsonRpcRequestPayload("algod_getWallet",[]))})}signGroupTransaction(n){return s(this,null,function*(){return this.request(this.utils.createJsonRpcRequestPayload("algod_signGroupTransaction",n))})}signGroupTransactionV2(n){return s(this,null,function*(){return this.request(this.utils.createJsonRpcRequestPayload("algod_signGroupTransactionV2",n))})}};module.exports=R(h);
|
|
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": ["import { Extension } from '@magic-sdk/commons';\nimport { AlgorandConfig, AlgorandPayloadMethod } from './types';\n\nexport class AlgorandExtension extends Extension.Internal<'algod', any> {\n name = 'algod' as const;\n config: any = {};\n\n constructor(public algorandConfig: AlgorandConfig) {\n super();\n\n this.config = {\n rpcUrl: algorandConfig.rpcUrl,\n chainType: 'ALOGD',\n };\n }\n\n public async signTransaction(txn: any) {\n return this.request(this.utils.createJsonRpcRequestPayload(AlgorandPayloadMethod.AlgorandSignTransaction, txn));\n }\n\n public async signBid(txn: any) {\n return this.request(this.utils.createJsonRpcRequestPayload(AlgorandPayloadMethod.AlgorandSignBid, txn));\n }\n\n public async getWallet() {\n return this.request(this.utils.createJsonRpcRequestPayload(AlgorandPayloadMethod.AlgorandGetWallet, []));\n }\n\n public async signGroupTransaction(txns: any[]) {\n return this.request(\n this.utils.createJsonRpcRequestPayload(AlgorandPayloadMethod.AlgorandSignGroupTransaction, txns),\n );\n }\n\n public async signGroupTransactionV2(txns: any) {\n return this.request(\n this.utils.createJsonRpcRequestPayload(AlgorandPayloadMethod.AlgorandSignGroupTransactionV2, txns),\n );\n }\n}\n"],
|
|
5
|
+
"mappings": "2tBAAA,8CAA0B,8BAGnB,mBAAgC,aAAU,QAAuB,CAItE,YAAmB,EAAgC,CACjD,QADiB,sBAHnB,UAAO,QACP,YAAc,GAKZ,KAAK,OAAS,CACZ,OAAQ,EAAe,OACvB,UAAW,SAIF,gBAAgB,EAAU,gCACrC,MAAO,MAAK,QAAQ,KAAK,MAAM,4BAA4B,wBAA+C,MAG/F,QAAQ,EAAU,gCAC7B,MAAO,MAAK,QAAQ,KAAK,MAAM,4BAA4B,gBAAuC,MAGvF,WAAY,gCACvB,MAAO,MAAK,QAAQ,KAAK,MAAM,4BAA4B,kBAAyC,OAGzF,qBAAqB,EAAa,gCAC7C,MAAO,MAAK,QACV,KAAK,MAAM,4BAA4B,6BAAoD,MAIlF,uBAAuB,EAAW,gCAC7C,MAAO,MAAK,QACR,KAAK,MAAM,4BAA4B,+BAAsD",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
package/dist/es/index.js
CHANGED
|
@@ -1,103 +1,2 @@
|
|
|
1
|
-
var
|
|
2
|
-
|
|
3
|
-
extendStatics = Object.setPrototypeOf ||
|
|
4
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
5
|
-
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
|
6
|
-
return extendStatics(d, b);
|
|
7
|
-
};
|
|
8
|
-
return function (d, b) {
|
|
9
|
-
extendStatics(d, b);
|
|
10
|
-
function __() { this.constructor = d; }
|
|
11
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
12
|
-
};
|
|
13
|
-
})();
|
|
14
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
15
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
16
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
17
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
18
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
19
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
20
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
21
|
-
});
|
|
22
|
-
};
|
|
23
|
-
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
24
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
25
|
-
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
26
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
27
|
-
function step(op) {
|
|
28
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
29
|
-
while (_) try {
|
|
30
|
-
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
31
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
32
|
-
switch (op[0]) {
|
|
33
|
-
case 0: case 1: t = op; break;
|
|
34
|
-
case 4: _.label++; return { value: op[1], done: false };
|
|
35
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
36
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
37
|
-
default:
|
|
38
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
39
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
40
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
41
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
42
|
-
if (t[2]) _.ops.pop();
|
|
43
|
-
_.trys.pop(); continue;
|
|
44
|
-
}
|
|
45
|
-
op = body.call(thisArg, _);
|
|
46
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
47
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
48
|
-
}
|
|
49
|
-
};
|
|
50
|
-
import { Extension } from 'magic-sdk';
|
|
51
|
-
import { AlgorandPayloadMethod } from './types';
|
|
52
|
-
var AlgorandExtension = /** @class */ (function (_super) {
|
|
53
|
-
__extends(AlgorandExtension, _super);
|
|
54
|
-
function AlgorandExtension(algorandConfig) {
|
|
55
|
-
var _this = _super.call(this) || this;
|
|
56
|
-
_this.algorandConfig = algorandConfig;
|
|
57
|
-
_this.name = 'algod';
|
|
58
|
-
_this.config = {};
|
|
59
|
-
_this.config = {
|
|
60
|
-
rpcUrl: algorandConfig.rpcUrl,
|
|
61
|
-
chainType: 'ALOGD',
|
|
62
|
-
};
|
|
63
|
-
return _this;
|
|
64
|
-
}
|
|
65
|
-
AlgorandExtension.prototype.signTransaction = function (txn) {
|
|
66
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
67
|
-
return __generator(this, function (_a) {
|
|
68
|
-
return [2 /*return*/, this.request(this.utils.createJsonRpcRequestPayload(AlgorandPayloadMethod.AlgorandSignTransaction, txn))];
|
|
69
|
-
});
|
|
70
|
-
});
|
|
71
|
-
};
|
|
72
|
-
AlgorandExtension.prototype.signBid = function (txn) {
|
|
73
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
74
|
-
return __generator(this, function (_a) {
|
|
75
|
-
return [2 /*return*/, this.request(this.utils.createJsonRpcRequestPayload(AlgorandPayloadMethod.AlgorandSignBid, txn))];
|
|
76
|
-
});
|
|
77
|
-
});
|
|
78
|
-
};
|
|
79
|
-
AlgorandExtension.prototype.getWallet = function () {
|
|
80
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
81
|
-
return __generator(this, function (_a) {
|
|
82
|
-
return [2 /*return*/, this.request(this.utils.createJsonRpcRequestPayload(AlgorandPayloadMethod.AlgorandGetWallet, []))];
|
|
83
|
-
});
|
|
84
|
-
});
|
|
85
|
-
};
|
|
86
|
-
AlgorandExtension.prototype.signGroupTransaction = function (txns) {
|
|
87
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
88
|
-
return __generator(this, function (_a) {
|
|
89
|
-
return [2 /*return*/, this.request(this.utils.createJsonRpcRequestPayload(AlgorandPayloadMethod.AlgorandSignGroupTransaction, txns))];
|
|
90
|
-
});
|
|
91
|
-
});
|
|
92
|
-
};
|
|
93
|
-
AlgorandExtension.prototype.signGroupTransactionV2 = function (txns) {
|
|
94
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
95
|
-
return __generator(this, function (_a) {
|
|
96
|
-
return [2 /*return*/, this.request(this.utils.createJsonRpcRequestPayload(AlgorandPayloadMethod.AlgorandSignGroupTransactionV2, txns))];
|
|
97
|
-
});
|
|
98
|
-
});
|
|
99
|
-
};
|
|
100
|
-
return AlgorandExtension;
|
|
101
|
-
}(Extension.Internal));
|
|
102
|
-
export { AlgorandExtension };
|
|
103
|
-
//# sourceMappingURL=index.js.map
|
|
1
|
+
var a=(e,n,i)=>new Promise((c,o)=>{var g=r=>{try{t(i.next(r))}catch(s){o(s)}},l=r=>{try{t(i.throw(r))}catch(s){o(s)}},t=r=>r.done?c(r.value):Promise.resolve(r.value).then(g,l);t((i=i.apply(e,n)).next())});import{Extension as u}from"@magic-sdk/commons";var p=class extends u.Internal{constructor(n){super();this.algorandConfig=n;this.name="algod";this.config={};this.config={rpcUrl:n.rpcUrl,chainType:"ALOGD"}}signTransaction(n){return a(this,null,function*(){return this.request(this.utils.createJsonRpcRequestPayload("algod_signTransaction",n))})}signBid(n){return a(this,null,function*(){return this.request(this.utils.createJsonRpcRequestPayload("algod_signBid",n))})}getWallet(){return a(this,null,function*(){return this.request(this.utils.createJsonRpcRequestPayload("algod_getWallet",[]))})}signGroupTransaction(n){return a(this,null,function*(){return this.request(this.utils.createJsonRpcRequestPayload("algod_signGroupTransaction",n))})}signGroupTransactionV2(n){return a(this,null,function*(){return this.request(this.utils.createJsonRpcRequestPayload("algod_signGroupTransactionV2",n))})}};export{p as AlgorandExtension};
|
|
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": ["import { Extension } from '@magic-sdk/commons';\nimport { AlgorandConfig, AlgorandPayloadMethod } from './types';\n\nexport class AlgorandExtension extends Extension.Internal<'algod', any> {\n name = 'algod' as const;\n config: any = {};\n\n constructor(public algorandConfig: AlgorandConfig) {\n super();\n\n this.config = {\n rpcUrl: algorandConfig.rpcUrl,\n chainType: 'ALOGD',\n };\n }\n\n public async signTransaction(txn: any) {\n return this.request(this.utils.createJsonRpcRequestPayload(AlgorandPayloadMethod.AlgorandSignTransaction, txn));\n }\n\n public async signBid(txn: any) {\n return this.request(this.utils.createJsonRpcRequestPayload(AlgorandPayloadMethod.AlgorandSignBid, txn));\n }\n\n public async getWallet() {\n return this.request(this.utils.createJsonRpcRequestPayload(AlgorandPayloadMethod.AlgorandGetWallet, []));\n }\n\n public async signGroupTransaction(txns: any[]) {\n return this.request(\n this.utils.createJsonRpcRequestPayload(AlgorandPayloadMethod.AlgorandSignGroupTransaction, txns),\n );\n }\n\n public async signGroupTransactionV2(txns: any) {\n return this.request(\n this.utils.createJsonRpcRequestPayload(AlgorandPayloadMethod.AlgorandSignGroupTransactionV2, txns),\n );\n }\n}\n"],
|
|
5
|
+
"mappings": "6MAAA,+CAGO,mBAAgC,GAAU,QAAuB,CAItE,YAAmB,EAAgC,CACjD,QADiB,sBAHnB,UAAO,QACP,YAAc,GAKZ,KAAK,OAAS,CACZ,OAAQ,EAAe,OACvB,UAAW,SAIF,gBAAgB,EAAU,gCACrC,MAAO,MAAK,QAAQ,KAAK,MAAM,4BAA4B,wBAA+C,MAG/F,QAAQ,EAAU,gCAC7B,MAAO,MAAK,QAAQ,KAAK,MAAM,4BAA4B,gBAAuC,MAGvF,WAAY,gCACvB,MAAO,MAAK,QAAQ,KAAK,MAAM,4BAA4B,kBAAyC,OAGzF,qBAAqB,EAAa,gCAC7C,MAAO,MAAK,QACV,KAAK,MAAM,4BAA4B,6BAAoD,MAIlF,uBAAuB,EAAW,gCAC7C,MAAO,MAAK,QACR,KAAK,MAAM,4BAA4B,+BAAsD",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
var a=(e,n,i)=>new Promise((c,o)=>{var g=r=>{try{t(i.next(r))}catch(s){o(s)}},l=r=>{try{t(i.throw(r))}catch(s){o(s)}},t=r=>r.done?c(r.value):Promise.resolve(r.value).then(g,l);t((i=i.apply(e,n)).next())});import{Extension as u}from"@magic-sdk/commons";var p=class extends u.Internal{constructor(n){super();this.algorandConfig=n;this.name="algod";this.config={};this.config={rpcUrl:n.rpcUrl,chainType:"ALOGD"}}signTransaction(n){return a(this,null,function*(){return this.request(this.utils.createJsonRpcRequestPayload("algod_signTransaction",n))})}signBid(n){return a(this,null,function*(){return this.request(this.utils.createJsonRpcRequestPayload("algod_signBid",n))})}getWallet(){return a(this,null,function*(){return this.request(this.utils.createJsonRpcRequestPayload("algod_getWallet",[]))})}signGroupTransaction(n){return a(this,null,function*(){return this.request(this.utils.createJsonRpcRequestPayload("algod_signGroupTransaction",n))})}signGroupTransactionV2(n){return a(this,null,function*(){return this.request(this.utils.createJsonRpcRequestPayload("algod_signGroupTransactionV2",n))})}};export{p as AlgorandExtension};
|
|
2
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/index.ts"],
|
|
4
|
+
"sourcesContent": ["import { Extension } from '@magic-sdk/commons';\nimport { AlgorandConfig, AlgorandPayloadMethod } from './types';\n\nexport class AlgorandExtension extends Extension.Internal<'algod', any> {\n name = 'algod' as const;\n config: any = {};\n\n constructor(public algorandConfig: AlgorandConfig) {\n super();\n\n this.config = {\n rpcUrl: algorandConfig.rpcUrl,\n chainType: 'ALOGD',\n };\n }\n\n public async signTransaction(txn: any) {\n return this.request(this.utils.createJsonRpcRequestPayload(AlgorandPayloadMethod.AlgorandSignTransaction, txn));\n }\n\n public async signBid(txn: any) {\n return this.request(this.utils.createJsonRpcRequestPayload(AlgorandPayloadMethod.AlgorandSignBid, txn));\n }\n\n public async getWallet() {\n return this.request(this.utils.createJsonRpcRequestPayload(AlgorandPayloadMethod.AlgorandGetWallet, []));\n }\n\n public async signGroupTransaction(txns: any[]) {\n return this.request(\n this.utils.createJsonRpcRequestPayload(AlgorandPayloadMethod.AlgorandSignGroupTransaction, txns),\n );\n }\n\n public async signGroupTransactionV2(txns: any) {\n return this.request(\n this.utils.createJsonRpcRequestPayload(AlgorandPayloadMethod.AlgorandSignGroupTransactionV2, txns),\n );\n }\n}\n"],
|
|
5
|
+
"mappings": "6MAAA,+CAGO,mBAAgC,GAAU,QAAuB,CAItE,YAAmB,EAAgC,CACjD,QADiB,sBAHnB,UAAO,QACP,YAAc,GAKZ,KAAK,OAAS,CACZ,OAAQ,EAAe,OACvB,UAAW,SAIF,gBAAgB,EAAU,gCACrC,MAAO,MAAK,QAAQ,KAAK,MAAM,4BAA4B,wBAA+C,MAG/F,QAAQ,EAAU,gCAC7B,MAAO,MAAK,QAAQ,KAAK,MAAM,4BAA4B,gBAAuC,MAGvF,WAAY,gCACvB,MAAO,MAAK,QAAQ,KAAK,MAAM,4BAA4B,kBAAyC,OAGzF,qBAAqB,EAAa,gCAC7C,MAAO,MAAK,QACV,KAAK,MAAM,4BAA4B,6BAAoD,MAIlF,uBAAuB,EAAW,gCAC7C,MAAO,MAAK,QACR,KAAK,MAAM,4BAA4B,+BAAsD",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
package/dist/extension.js
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
var MagicAlgorandExtension=
|
|
1
|
+
var MagicAlgorandExtension=(()=>{var G=Object.create;var e=Object.defineProperty;var q=Object.getOwnPropertyDescriptor;var R=Object.getOwnPropertyNames;var h=Object.getPrototypeOf,x=Object.prototype.hasOwnProperty;var u=r=>e(r,"__esModule",{value:!0});var m=(r,n)=>()=>(n||r((n={exports:{}}).exports,n),n.exports),S=(r,n)=>{for(var t in n)e(r,t,{get:n[t],enumerable:!0})},p=(r,n,t,o)=>{if(n&&typeof n=="object"||typeof n=="function")for(let a of R(n))!x.call(r,a)&&(t||a!=="default")&&e(r,a,{get:()=>n[a],enumerable:!(o=q(n,a))||o.enumerable});return r},b=(r,n)=>p(u(e(r!=null?G(h(r)):{},"default",!n&&r&&r.__esModule?{get:()=>r.default,enumerable:!0}:{value:r,enumerable:!0})),r),J=(r=>(n,t)=>r&&r.get(n)||(t=p(u({}),n,1),r&&r.set(n,t),t))(typeof WeakMap!="undefined"?new WeakMap:0);var s=(r,n,t)=>new Promise((o,a)=>{var f=i=>{try{c(t.next(i))}catch(g){a(g)}},A=i=>{try{c(t.throw(i))}catch(g){a(g)}},c=i=>i.done?o(i.value):Promise.resolve(i.value).then(f,A);c((t=t.apply(r,n)).next())});var y=m((U,d)=>{d.exports=Magic});var B={};S(B,{default:()=>_});var T=b(y());var l=class extends T.Extension.Internal{constructor(n){super();this.algorandConfig=n;this.name="algod";this.config={};this.config={rpcUrl:n.rpcUrl,chainType:"ALOGD"}}signTransaction(n){return s(this,null,function*(){return this.request(this.utils.createJsonRpcRequestPayload("algod_signTransaction",n))})}signBid(n){return s(this,null,function*(){return this.request(this.utils.createJsonRpcRequestPayload("algod_signBid",n))})}getWallet(){return s(this,null,function*(){return this.request(this.utils.createJsonRpcRequestPayload("algod_getWallet",[]))})}signGroupTransaction(n){return s(this,null,function*(){return this.request(this.utils.createJsonRpcRequestPayload("algod_signGroupTransaction",n))})}signGroupTransactionV2(n){return s(this,null,function*(){return this.request(this.utils.createJsonRpcRequestPayload("algod_signGroupTransactionV2",n))})}};var _=l;return J(B);})();
|
|
2
|
+
if (MagicAlgorandExtension && MagicAlgorandExtension.default != null) { MagicAlgorandExtension = Object.assign(MagicAlgorandExtension.default, MagicAlgorandExtension); delete MagicAlgorandExtension.default; }
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
var g=Object.defineProperty;var y=Object.getOwnPropertyDescriptor;var T=Object.getOwnPropertyNames;var f=Object.prototype.hasOwnProperty;var G=r=>g(r,"__esModule",{value:!0});var q=(r,n)=>{for(var a in n)g(r,a,{get:n[a],enumerable:!0})},A=(r,n,a,e)=>{if(n&&typeof n=="object"||typeof n=="function")for(let i of T(n))!f.call(r,i)&&(a||i!=="default")&&g(r,i,{get:()=>n[i],enumerable:!(e=y(n,i))||e.enumerable});return r};var R=(r=>(n,a)=>r&&r.get(n)||(a=A(G({}),n,1),r&&r.set(n,a),a))(typeof WeakMap!="undefined"?new WeakMap:0);var s=(r,n,a)=>new Promise((e,i)=>{var p=t=>{try{o(a.next(t))}catch(c){i(c)}},d=t=>{try{o(a.throw(t))}catch(c){i(c)}},o=t=>t.done?e(t.value):Promise.resolve(t.value).then(p,d);o((a=a.apply(r,n)).next())});var h={};q(h,{AlgorandExtension:()=>u});var l=require("@magic-sdk/commons");var u=class extends l.Extension.Internal{constructor(n){super();this.algorandConfig=n;this.name="algod";this.config={};this.config={rpcUrl:n.rpcUrl,chainType:"ALOGD"}}signTransaction(n){return s(this,null,function*(){return this.request(this.utils.createJsonRpcRequestPayload("algod_signTransaction",n))})}signBid(n){return s(this,null,function*(){return this.request(this.utils.createJsonRpcRequestPayload("algod_signBid",n))})}getWallet(){return s(this,null,function*(){return this.request(this.utils.createJsonRpcRequestPayload("algod_getWallet",[]))})}signGroupTransaction(n){return s(this,null,function*(){return this.request(this.utils.createJsonRpcRequestPayload("algod_signGroupTransaction",n))})}signGroupTransactionV2(n){return s(this,null,function*(){return this.request(this.utils.createJsonRpcRequestPayload("algod_signGroupTransactionV2",n))})}};module.exports=R(h);
|
|
2
|
+
//# sourceMappingURL=index.native.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
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 { AlgorandConfig, AlgorandPayloadMethod } from './types';\n\nexport class AlgorandExtension extends Extension.Internal<'algod', any> {\n name = 'algod' as const;\n config: any = {};\n\n constructor(public algorandConfig: AlgorandConfig) {\n super();\n\n this.config = {\n rpcUrl: algorandConfig.rpcUrl,\n chainType: 'ALOGD',\n };\n }\n\n public async signTransaction(txn: any) {\n return this.request(this.utils.createJsonRpcRequestPayload(AlgorandPayloadMethod.AlgorandSignTransaction, txn));\n }\n\n public async signBid(txn: any) {\n return this.request(this.utils.createJsonRpcRequestPayload(AlgorandPayloadMethod.AlgorandSignBid, txn));\n }\n\n public async getWallet() {\n return this.request(this.utils.createJsonRpcRequestPayload(AlgorandPayloadMethod.AlgorandGetWallet, []));\n }\n\n public async signGroupTransaction(txns: any[]) {\n return this.request(\n this.utils.createJsonRpcRequestPayload(AlgorandPayloadMethod.AlgorandSignGroupTransaction, txns),\n );\n }\n\n public async signGroupTransactionV2(txns: any) {\n return this.request(\n this.utils.createJsonRpcRequestPayload(AlgorandPayloadMethod.AlgorandSignGroupTransactionV2, txns),\n );\n }\n}\n"],
|
|
5
|
+
"mappings": "2tBAAA,wCCAA,MAA0B,8BAGnB,mBAAgC,aAAU,QAAuB,CAItE,YAAmB,EAAgC,CACjD,QADiB,sBAHnB,UAAO,QACP,YAAc,GAKZ,KAAK,OAAS,CACZ,OAAQ,EAAe,OACvB,UAAW,SAIF,gBAAgB,EAAU,gCACrC,MAAO,MAAK,QAAQ,KAAK,MAAM,4BAA4B,wBAA+C,MAG/F,QAAQ,EAAU,gCAC7B,MAAO,MAAK,QAAQ,KAAK,MAAM,4BAA4B,gBAAuC,MAGvF,WAAY,gCACvB,MAAO,MAAK,QAAQ,KAAK,MAAM,4BAA4B,kBAAyC,OAGzF,qBAAqB,EAAa,gCAC7C,MAAO,MAAK,QACV,KAAK,MAAM,4BAA4B,6BAAoD,MAIlF,uBAAuB,EAAW,gCAC7C,MAAO,MAAK,QACR,KAAK,MAAM,4BAA4B,+BAAsD",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { AlgorandExtension } from './index';
|
|
2
|
-
export
|
|
2
|
+
export default AlgorandExtension;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './index';
|
|
File without changes
|
package/package.json
CHANGED
|
@@ -1,51 +1,34 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@magic-ext/algorand",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.1.0",
|
|
4
4
|
"description": "magic algorand extension",
|
|
5
|
-
"author": "Magic <
|
|
5
|
+
"author": "Magic <team@magic.link> (https://magic.link/)",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"repository": {
|
|
8
8
|
"type": "git",
|
|
9
|
-
"url": "https://github.com/
|
|
9
|
+
"url": "https://github.com/magiclabs/magic-js"
|
|
10
10
|
},
|
|
11
11
|
"files": [
|
|
12
|
-
"dist
|
|
13
|
-
"dist/**/*.js.map",
|
|
14
|
-
"dist/**/*.d.ts"
|
|
12
|
+
"dist"
|
|
15
13
|
],
|
|
16
|
-
"
|
|
17
|
-
"
|
|
18
|
-
"
|
|
19
|
-
"
|
|
20
|
-
"
|
|
21
|
-
"
|
|
22
|
-
"
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
"require": [
|
|
27
|
-
"ts-node/register",
|
|
28
|
-
"./test/setup.ts"
|
|
29
|
-
],
|
|
30
|
-
"files": [
|
|
31
|
-
"test/**/*.spec.ts"
|
|
32
|
-
],
|
|
33
|
-
"extensions": [
|
|
34
|
-
"ts"
|
|
35
|
-
],
|
|
36
|
-
"verbose": true
|
|
14
|
+
"target": "neutral",
|
|
15
|
+
"cdnGlobalName": "MagicAlgorandExtension",
|
|
16
|
+
"main": "./dist/cjs/index.js",
|
|
17
|
+
"module": "./dist/es/index.js",
|
|
18
|
+
"types": "./dist/types/index.d.ts",
|
|
19
|
+
"jsdelivr": "./dist/extension.js",
|
|
20
|
+
"react-native": "./dist/react-native/index.native.js",
|
|
21
|
+
"exports": {
|
|
22
|
+
"import": "./dist/es/index.mjs",
|
|
23
|
+
"require": "./dist/cjs/index.js"
|
|
37
24
|
},
|
|
38
|
-
"
|
|
39
|
-
"
|
|
40
|
-
|
|
41
|
-
"check-coverage": true,
|
|
42
|
-
"per-file": true,
|
|
43
|
-
"lines": 99,
|
|
44
|
-
"statements": 99,
|
|
45
|
-
"functions": 99,
|
|
46
|
-
"branches": 99,
|
|
47
|
-
"reporter": [
|
|
48
|
-
"lcov"
|
|
25
|
+
"externals": {
|
|
26
|
+
"include": [
|
|
27
|
+
"@magic-sdk/commons"
|
|
49
28
|
]
|
|
50
|
-
}
|
|
29
|
+
},
|
|
30
|
+
"devDependencies": {
|
|
31
|
+
"@magic-sdk/commons": "^4.1.0"
|
|
32
|
+
},
|
|
33
|
+
"gitHead": "6aa5a25b33865cfe27444ca6094efade16a82f9f"
|
|
51
34
|
}
|
package/dist/cjs/index.cdn.js
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.default = void 0;
|
|
4
|
-
var index_1 = require("./index");
|
|
5
|
-
Object.defineProperty(exports, "default", { enumerable: true, get: function () { return index_1.AlgorandExtension; } });
|
|
6
|
-
//# sourceMappingURL=index.cdn.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.cdn.js","sourceRoot":"","sources":["../../src/index.cdn.ts"],"names":[],"mappings":";;;AAAA,iCAA4C;AAEd,wFAFrB,yBAAiB,OAEW"}
|
package/dist/cjs/index.d.ts
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { Extension } from 'magic-sdk';
|
|
2
|
-
import { AlgorandConfig } from './types';
|
|
3
|
-
export declare class AlgorandExtension extends Extension.Internal<'algod', any> {
|
|
4
|
-
algorandConfig: AlgorandConfig;
|
|
5
|
-
name: "algod";
|
|
6
|
-
config: any;
|
|
7
|
-
constructor(algorandConfig: AlgorandConfig);
|
|
8
|
-
signTransaction(txn: any): Promise<any>;
|
|
9
|
-
signBid(txn: any): Promise<any>;
|
|
10
|
-
getWallet(): Promise<any>;
|
|
11
|
-
signGroupTransaction(txns: any[]): Promise<any>;
|
|
12
|
-
signGroupTransactionV2(txns: any): Promise<any>;
|
|
13
|
-
}
|
package/dist/cjs/types.js
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.AlgorandPayloadMethod = void 0;
|
|
4
|
-
var AlgorandPayloadMethod;
|
|
5
|
-
(function (AlgorandPayloadMethod) {
|
|
6
|
-
AlgorandPayloadMethod["AlgorandSignTransaction"] = "algod_signTransaction";
|
|
7
|
-
AlgorandPayloadMethod["AlgorandSignBid"] = "algod_signBid";
|
|
8
|
-
AlgorandPayloadMethod["AlgorandGetWallet"] = "algod_getWallet";
|
|
9
|
-
AlgorandPayloadMethod["AlgorandSignGroupTransaction"] = "algod_signGroupTransaction";
|
|
10
|
-
AlgorandPayloadMethod["AlgorandSignGroupTransactionV2"] = "algod_signGroupTransactionV2";
|
|
11
|
-
})(AlgorandPayloadMethod = exports.AlgorandPayloadMethod || (exports.AlgorandPayloadMethod = {}));
|
|
12
|
-
//# sourceMappingURL=types.js.map
|
package/dist/cjs/types.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":";;;AASA,IAAY,qBAMX;AAND,WAAY,qBAAqB;IAC/B,0EAAiD,CAAA;IACjD,0DAAiC,CAAA;IACjC,8DAAqC,CAAA;IACrC,oFAA2D,CAAA;IAC3D,wFAA+D,CAAA;AACjE,CAAC,EANW,qBAAqB,GAArB,6BAAqB,KAArB,6BAAqB,QAMhC"}
|
package/dist/es/index.cdn.d.ts
DELETED
package/dist/es/index.cdn.js
DELETED
package/dist/es/index.cdn.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.cdn.js","sourceRoot":"","sources":["../../src/index.cdn.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAE5C,OAAO,EAAE,iBAAiB,IAAI,OAAO,EAAE,CAAC"}
|
package/dist/es/types.d.ts
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
export interface AlgorandConfig {
|
|
2
|
-
rpcUrl: string;
|
|
3
|
-
}
|
|
4
|
-
export interface ConfigType {
|
|
5
|
-
rpcUrl: string;
|
|
6
|
-
chainType: string;
|
|
7
|
-
}
|
|
8
|
-
export declare enum AlgorandPayloadMethod {
|
|
9
|
-
AlgorandSignTransaction = "algod_signTransaction",
|
|
10
|
-
AlgorandSignBid = "algod_signBid",
|
|
11
|
-
AlgorandGetWallet = "algod_getWallet",
|
|
12
|
-
AlgorandSignGroupTransaction = "algod_signGroupTransaction",
|
|
13
|
-
AlgorandSignGroupTransactionV2 = "algod_signGroupTransactionV2"
|
|
14
|
-
}
|
package/dist/es/types.js
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
export var AlgorandPayloadMethod;
|
|
2
|
-
(function (AlgorandPayloadMethod) {
|
|
3
|
-
AlgorandPayloadMethod["AlgorandSignTransaction"] = "algod_signTransaction";
|
|
4
|
-
AlgorandPayloadMethod["AlgorandSignBid"] = "algod_signBid";
|
|
5
|
-
AlgorandPayloadMethod["AlgorandGetWallet"] = "algod_getWallet";
|
|
6
|
-
AlgorandPayloadMethod["AlgorandSignGroupTransaction"] = "algod_signGroupTransaction";
|
|
7
|
-
AlgorandPayloadMethod["AlgorandSignGroupTransactionV2"] = "algod_signGroupTransactionV2";
|
|
8
|
-
})(AlgorandPayloadMethod || (AlgorandPayloadMethod = {}));
|
|
9
|
-
//# sourceMappingURL=types.js.map
|
package/dist/es/types.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":"AASA,MAAM,CAAN,IAAY,qBAMX;AAND,WAAY,qBAAqB;IAC/B,0EAAiD,CAAA;IACjD,0DAAiC,CAAA;IACjC,8DAAqC,CAAA;IACrC,oFAA2D,CAAA;IAC3D,wFAA+D,CAAA;AACjE,CAAC,EANW,qBAAqB,KAArB,qBAAqB,QAMhC"}
|