@zebec-network/exchange-card-sdk 1.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/LICENSE +21 -0
- package/README.md +339 -0
- package/dist/artifacts/abi/ERC20.json +350 -0
- package/dist/artifacts/abi/ZebecCard.json +1060 -0
- package/dist/artifacts/abi/index.d.ts +122 -0
- package/dist/artifacts/abi/index.js +10 -0
- package/dist/artifacts/index.d.ts +2 -0
- package/dist/artifacts/index.js +18 -0
- package/dist/artifacts/typechain-types/ERC20.d.ts +149 -0
- package/dist/artifacts/typechain-types/ERC20.js +2 -0
- package/dist/artifacts/typechain-types/ZebecCard.d.ts +639 -0
- package/dist/artifacts/typechain-types/ZebecCard.js +2 -0
- package/dist/artifacts/typechain-types/common.d.ts +50 -0
- package/dist/artifacts/typechain-types/common.js +2 -0
- package/dist/artifacts/typechain-types/factories/ERC20__factory.d.ts +280 -0
- package/dist/artifacts/typechain-types/factories/ERC20__factory.js +378 -0
- package/dist/artifacts/typechain-types/factories/ZebecCard__factory.d.ts +835 -0
- package/dist/artifacts/typechain-types/factories/ZebecCard__factory.js +1088 -0
- package/dist/artifacts/typechain-types/factories/index.d.ts +2 -0
- package/dist/artifacts/typechain-types/factories/index.js +10 -0
- package/dist/artifacts/typechain-types/index.d.ts +5 -0
- package/dist/artifacts/typechain-types/index.js +31 -0
- package/dist/chains.d.ts +18 -0
- package/dist/chains.js +39 -0
- package/dist/constants.d.ts +3649 -0
- package/dist/constants.js +2502 -0
- package/dist/errors.d.ts +24 -0
- package/dist/errors.js +51 -0
- package/dist/helpers/apiHelpers.d.ts +30 -0
- package/dist/helpers/apiHelpers.js +92 -0
- package/dist/index.d.ts +10 -0
- package/dist/index.js +26 -0
- package/dist/services/EvmService.d.ts +37 -0
- package/dist/services/EvmService.js +134 -0
- package/dist/services/TaoService.d.ts +49 -0
- package/dist/services/TaoService.js +106 -0
- package/dist/services/TonService.d.ts +57 -0
- package/dist/services/TonService.js +137 -0
- package/dist/services/XdbService.d.ts +58 -0
- package/dist/services/XdbService.js +140 -0
- package/dist/services/stellarService.d.ts +52 -0
- package/dist/services/stellarService.js +119 -0
- package/dist/types.d.ts +59 -0
- package/dist/types.js +263 -0
- package/dist/utils.d.ts +8 -0
- package/dist/utils.js +48 -0
- package/package.json +58 -0
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ZebecCard__factory = exports.ERC20__factory = void 0;
|
|
4
|
+
/* Autogenerated file. Do not edit manually. */
|
|
5
|
+
/* tslint:disable */
|
|
6
|
+
/* eslint-disable */
|
|
7
|
+
var ERC20__factory_1 = require("./ERC20__factory");
|
|
8
|
+
Object.defineProperty(exports, "ERC20__factory", { enumerable: true, get: function () { return ERC20__factory_1.ERC20__factory; } });
|
|
9
|
+
var ZebecCard__factory_1 = require("./ZebecCard__factory");
|
|
10
|
+
Object.defineProperty(exports, "ZebecCard__factory", { enumerable: true, get: function () { return ZebecCard__factory_1.ZebecCard__factory; } });
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
+
exports.ZebecCard__factory = exports.ERC20__factory = exports.factories = void 0;
|
|
27
|
+
exports.factories = __importStar(require("./factories"));
|
|
28
|
+
var ERC20__factory_1 = require("./factories/ERC20__factory");
|
|
29
|
+
Object.defineProperty(exports, "ERC20__factory", { enumerable: true, get: function () { return ERC20__factory_1.ERC20__factory; } });
|
|
30
|
+
var ZebecCard__factory_1 = require("./factories/ZebecCard__factory");
|
|
31
|
+
Object.defineProperty(exports, "ZebecCard__factory", { enumerable: true, get: function () { return ZebecCard__factory_1.ZebecCard__factory; } });
|
package/dist/chains.d.ts
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Supported chainIds by zebec instant card sdk.
|
|
3
|
+
*/
|
|
4
|
+
export declare enum SupportedChain {
|
|
5
|
+
Mainnet = 1,
|
|
6
|
+
Sepolia = 11155111,
|
|
7
|
+
Base = 8453,
|
|
8
|
+
Bsc = 56,
|
|
9
|
+
BscTestnet = 97,
|
|
10
|
+
Bittensor = 558,
|
|
11
|
+
BittensorTestnet = 559,
|
|
12
|
+
Ton = -239,
|
|
13
|
+
TonTestnet = -3,
|
|
14
|
+
XdbChain = -4,
|
|
15
|
+
Stellar = -5
|
|
16
|
+
}
|
|
17
|
+
export declare const TESTNET_CHAINIDS: number[];
|
|
18
|
+
export declare function parseSupportedChain(chainId: number): SupportedChain;
|
package/dist/chains.js
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TESTNET_CHAINIDS = exports.SupportedChain = void 0;
|
|
4
|
+
exports.parseSupportedChain = parseSupportedChain;
|
|
5
|
+
const errors_1 = require("./errors");
|
|
6
|
+
/**
|
|
7
|
+
* Supported chainIds by zebec instant card sdk.
|
|
8
|
+
*/
|
|
9
|
+
var SupportedChain;
|
|
10
|
+
(function (SupportedChain) {
|
|
11
|
+
SupportedChain[SupportedChain["Mainnet"] = 1] = "Mainnet";
|
|
12
|
+
SupportedChain[SupportedChain["Sepolia"] = 11155111] = "Sepolia";
|
|
13
|
+
SupportedChain[SupportedChain["Base"] = 8453] = "Base";
|
|
14
|
+
SupportedChain[SupportedChain["Bsc"] = 56] = "Bsc";
|
|
15
|
+
SupportedChain[SupportedChain["BscTestnet"] = 97] = "BscTestnet";
|
|
16
|
+
SupportedChain[SupportedChain["Bittensor"] = 558] = "Bittensor";
|
|
17
|
+
SupportedChain[SupportedChain["BittensorTestnet"] = 559] = "BittensorTestnet";
|
|
18
|
+
SupportedChain[SupportedChain["Ton"] = -239] = "Ton";
|
|
19
|
+
SupportedChain[SupportedChain["TonTestnet"] = -3] = "TonTestnet";
|
|
20
|
+
SupportedChain[SupportedChain["XdbChain"] = -4] = "XdbChain";
|
|
21
|
+
SupportedChain[SupportedChain["Stellar"] = -5] = "Stellar";
|
|
22
|
+
})(SupportedChain || (exports.SupportedChain = SupportedChain = {}));
|
|
23
|
+
exports.TESTNET_CHAINIDS = [11155111, 97];
|
|
24
|
+
function parseSupportedChain(chainId) {
|
|
25
|
+
switch (chainId) {
|
|
26
|
+
case 1:
|
|
27
|
+
return SupportedChain.Mainnet;
|
|
28
|
+
case 11155111:
|
|
29
|
+
return SupportedChain.Sepolia;
|
|
30
|
+
case 8453:
|
|
31
|
+
return SupportedChain.Base;
|
|
32
|
+
case 56:
|
|
33
|
+
return SupportedChain.Bsc;
|
|
34
|
+
case 97:
|
|
35
|
+
return SupportedChain.BscTestnet;
|
|
36
|
+
default:
|
|
37
|
+
throw new errors_1.UnsupportedChainError(chainId);
|
|
38
|
+
}
|
|
39
|
+
}
|