@caict/bop-typescript-sdk 1.0.2 → 1.0.4
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 +34 -0
- package/base.tsconfig.json +14 -0
- package/dist/bop/bop-base/base.d.ts +24 -0
- package/dist/bop/bop-base/base.js +253 -0
- package/dist/bop/bop-base/base.js.map +1 -0
- package/dist/bop/bop-base/index.d.ts +18 -0
- package/dist/bop/bop-base/index.js +69 -0
- package/dist/bop/bop-base/index.js.map +1 -0
- package/dist/bop/bop-base/permit.d.ts +11 -0
- package/dist/bop/bop-base/permit.js +104 -0
- package/dist/bop/bop-base/permit.js.map +1 -0
- package/dist/bop/bop-base/test/base.test.d.ts +1 -0
- package/dist/bop/bop-base/test/base.test.js +772 -0
- package/dist/bop/bop-base/test/base.test.js.map +1 -0
- package/dist/bop/bop-base/test/index.test.d.ts +1 -0
- package/dist/bop/bop-base/test/index.test.js +89 -0
- package/dist/bop/bop-base/test/index.test.js.map +1 -0
- package/dist/bop/bop-base/test/permit.test.d.ts +1 -0
- package/dist/bop/bop-base/test/permit.test.js +140 -0
- package/dist/bop/bop-base/test/permit.test.js.map +1 -0
- package/dist/bop/bop-proto/bop-ws.d.ts +325 -0
- package/dist/bop/bop-proto/bop-ws.js +3599 -0
- package/dist/bop/bop-proto/bop-ws.js.map +1 -0
- package/dist/bop/bop-proto/bop.d.ts +903 -0
- package/dist/bop/bop-proto/bop.js +10421 -0
- package/dist/bop/bop-proto/bop.js.map +1 -0
- package/dist/bop/bop-ws/index.d.ts +43 -0
- package/dist/bop/bop-ws/index.js +265 -0
- package/dist/bop/bop-ws/index.js.map +1 -0
- package/dist/bop/bop-ws/sample/sample.d.ts +1 -0
- package/dist/bop/bop-ws/sample/sample.js +96 -0
- package/dist/bop/bop-ws/sample/sample.js.map +1 -0
- package/dist/bop/index.d.ts +5 -0
- package/dist/bop/index.js +37 -0
- package/dist/bop/index.js.map +1 -0
- package/dist/bop-sdk/index.d.ts +13 -0
- package/dist/bop-sdk/index.js +45 -0
- package/dist/bop-sdk/index.js.map +1 -0
- package/dist/bop-sdk/interface/abstract-service/abstract-account.d.ts +8 -0
- package/dist/bop-sdk/interface/abstract-service/abstract-account.js +7 -0
- package/dist/bop-sdk/interface/abstract-service/abstract-account.js.map +1 -0
- package/dist/bop-sdk/interface/abstract-service/abstract-chain.d.ts +5 -0
- package/dist/bop-sdk/interface/abstract-service/abstract-chain.js +7 -0
- package/dist/bop-sdk/interface/abstract-service/abstract-chain.js.map +1 -0
- package/dist/bop-sdk/interface/abstract-service/abstract-contract.d.ts +6 -0
- package/dist/bop-sdk/interface/abstract-service/abstract-contract.js +7 -0
- package/dist/bop-sdk/interface/abstract-service/abstract-contract.js.map +1 -0
- package/dist/bop-sdk/interface/abstract-service/abstract-ledger.d.ts +8 -0
- package/dist/bop-sdk/interface/abstract-service/abstract-ledger.js +7 -0
- package/dist/bop-sdk/interface/abstract-service/abstract-ledger.js.map +1 -0
- package/dist/bop-sdk/interface/abstract-service/abstract-provider.d.ts +12 -0
- package/dist/bop-sdk/interface/abstract-service/abstract-provider.js +7 -0
- package/dist/bop-sdk/interface/abstract-service/abstract-provider.js.map +1 -0
- package/dist/bop-sdk/interface/abstract-service/abstract-signer.d.ts +17 -0
- package/dist/bop-sdk/interface/abstract-service/abstract-signer.js +109 -0
- package/dist/bop-sdk/interface/abstract-service/abstract-signer.js.map +1 -0
- package/dist/bop-sdk/interface/abstract-service/abstract-transaction.d.ts +17 -0
- package/dist/bop-sdk/interface/abstract-service/abstract-transaction.js +7 -0
- package/dist/bop-sdk/interface/abstract-service/abstract-transaction.js.map +1 -0
- package/dist/bop-sdk/interface/provider-ws.d.ts +5 -0
- package/dist/bop-sdk/interface/provider-ws.js +12 -0
- package/dist/bop-sdk/interface/provider-ws.js.map +1 -0
- package/dist/bop-sdk/interface/provider.d.ts +7 -0
- package/dist/bop-sdk/interface/provider.js +23 -0
- package/dist/bop-sdk/interface/provider.js.map +1 -0
- package/dist/bop-sdk/interface/service/3rd.d.ts +12 -0
- package/dist/bop-sdk/interface/service/3rd.js +49 -0
- package/dist/bop-sdk/interface/service/3rd.js.map +1 -0
- package/dist/bop-sdk/interface/service/account.d.ts +12 -0
- package/dist/bop-sdk/interface/service/account.js +98 -0
- package/dist/bop-sdk/interface/service/account.js.map +1 -0
- package/dist/bop-sdk/interface/service/chain.d.ts +9 -0
- package/dist/bop-sdk/interface/service/chain.js +55 -0
- package/dist/bop-sdk/interface/service/chain.js.map +1 -0
- package/dist/bop-sdk/interface/service/contract.d.ts +10 -0
- package/dist/bop-sdk/interface/service/contract.js +67 -0
- package/dist/bop-sdk/interface/service/contract.js.map +1 -0
- package/dist/bop-sdk/interface/service/helper.d.ts +20 -0
- package/dist/bop-sdk/interface/service/helper.js +383 -0
- package/dist/bop-sdk/interface/service/helper.js.map +1 -0
- package/dist/bop-sdk/interface/service/ledger.d.ts +12 -0
- package/dist/bop-sdk/interface/service/ledger.js +89 -0
- package/dist/bop-sdk/interface/service/ledger.js.map +1 -0
- package/dist/bop-sdk/interface/service/offline/check/index.js +138 -0
- package/dist/bop-sdk/interface/service/offline/common/constant.js +6 -0
- package/dist/bop-sdk/interface/service/offline/common/snowFlakeUtils.js +192 -0
- package/dist/bop-sdk/interface/service/offline/common/util.js +511 -0
- package/dist/bop-sdk/interface/service/offline/exception/customErrors.js +29 -0
- package/dist/bop-sdk/interface/service/offline/exception/errors.js +90 -0
- package/dist/bop-sdk/interface/service/offline/exception/index.js +5 -0
- package/dist/bop-sdk/interface/service/offline/operation/accountCreateOperation.js +28 -0
- package/dist/bop-sdk/interface/service/offline/operation/accountSetMetadataOperation.js +44 -0
- package/dist/bop-sdk/interface/service/offline/operation/accountSetPrivilegeOperation.js +49 -0
- package/dist/bop-sdk/interface/service/offline/operation/contractCreateOperation.js +43 -0
- package/dist/bop-sdk/interface/service/offline/operation/contractInvokeOperation.js +42 -0
- package/dist/bop-sdk/interface/service/offline/operation/contractInvokeRequestOperation.js +69 -0
- package/dist/bop-sdk/interface/service/offline/operation/gasSendOperation.js +29 -0
- package/dist/bop-sdk/interface/service/offline/operation/gasSendRequestOperation.js +61 -0
- package/dist/bop-sdk/interface/service/offline/operation/index.js +20 -0
- package/dist/bop-sdk/interface/service/offline/proto/chain_pb.js +12079 -0
- package/dist/bop-sdk/interface/service/offline/proto/common_pb.js +2867 -0
- package/dist/bop-sdk/interface/service/offline/transaction/index.js +988 -0
- package/dist/bop-sdk/interface/service/offline/transaction/operations.js +188 -0
- package/dist/bop-sdk/interface/service/offline/validate/account.js +152 -0
- package/dist/bop-sdk/interface/service/offline/validate/contract.js +101 -0
- package/dist/bop-sdk/interface/service/offline/validate/index.js +10 -0
- package/dist/bop-sdk/interface/service/offline/validate/transaction.js +51 -0
- package/dist/bop-sdk/interface/service/transaction.d.ts +21 -0
- package/dist/bop-sdk/interface/service/transaction.js +591 -0
- package/dist/bop-sdk/interface/service/transaction.js.map +1 -0
- package/dist/bop-sdk/interface/signer.d.ts +12 -0
- package/dist/bop-sdk/interface/signer.js +53 -0
- package/dist/bop-sdk/interface/signer.js.map +1 -0
- package/dist/bop-sdk/interface/test/3rd.test.d.ts +1 -0
- package/dist/bop-sdk/interface/test/3rd.test.js +1524 -0
- package/dist/bop-sdk/interface/test/3rd.test.js.map +1 -0
- package/dist/bop-sdk/interface/test/account.test.d.ts +1 -0
- package/dist/bop-sdk/interface/test/account.test.js +225 -0
- package/dist/bop-sdk/interface/test/account.test.js.map +1 -0
- package/dist/bop-sdk/interface/test/chain.test.d.ts +1 -0
- package/dist/bop-sdk/interface/test/chain.test.js +72 -0
- package/dist/bop-sdk/interface/test/chain.test.js.map +1 -0
- package/dist/bop-sdk/interface/test/contract.test.d.ts +1 -0
- package/dist/bop-sdk/interface/test/contract.test.js +266 -0
- package/dist/bop-sdk/interface/test/contract.test.js.map +1 -0
- package/dist/bop-sdk/interface/test/ledger.test.d.ts +1 -0
- package/dist/bop-sdk/interface/test/ledger.test.js +167 -0
- package/dist/bop-sdk/interface/test/ledger.test.js.map +1 -0
- package/dist/bop-sdk/interface/test/provider.test.d.ts +1 -0
- package/dist/bop-sdk/interface/test/provider.test.js +295 -0
- package/dist/bop-sdk/interface/test/provider.test.js.map +1 -0
- package/dist/bop-sdk/interface/test/signer.test.d.ts +1 -0
- package/dist/bop-sdk/interface/test/signer.test.js +87 -0
- package/dist/bop-sdk/interface/test/signer.test.js.map +1 -0
- package/dist/bop-sdk/interface/test/transaction.test.d.ts +1 -0
- package/dist/bop-sdk/interface/test/transaction.test.js +663 -0
- package/dist/bop-sdk/interface/test/transaction.test.js.map +1 -0
- package/dist/bop-sdk/proto/bop-sdk-common.d.ts +225 -0
- package/dist/bop-sdk/proto/bop-sdk-common.js +831 -0
- package/dist/bop-sdk/proto/bop-sdk-common.js.map +1 -0
- package/dist/bop-sdk/proto/bop-sdk-interface.d.ts +623 -0
- package/dist/bop-sdk/proto/bop-sdk-interface.js +8623 -0
- package/dist/bop-sdk/proto/bop-sdk-interface.js.map +1 -0
- package/dist/bop-sdk/proto/bop-sdk-utils.d.ts +107 -0
- package/dist/bop-sdk/proto/bop-sdk-utils.js +1160 -0
- package/dist/bop-sdk/proto/bop-sdk-utils.js.map +1 -0
- package/dist/bop-sdk/utils/abi/abi-coder.d.ts +16 -0
- package/dist/bop-sdk/utils/abi/abi-coder.js +101 -0
- package/dist/bop-sdk/utils/abi/abi-coder.js.map +1 -0
- package/dist/bop-sdk/utils/abi/address.d.ts +8 -0
- package/dist/bop-sdk/utils/abi/address.js +116 -0
- package/dist/bop-sdk/utils/abi/address.js.map +1 -0
- package/dist/bop-sdk/utils/abi/bignumber.d.ts +39 -0
- package/dist/bop-sdk/utils/abi/bignumber.js +316 -0
- package/dist/bop-sdk/utils/abi/bignumber.js.map +1 -0
- package/dist/bop-sdk/utils/abi/bytes.d.ts +41 -0
- package/dist/bop-sdk/utils/abi/bytes.js +423 -0
- package/dist/bop-sdk/utils/abi/bytes.js.map +1 -0
- package/dist/bop-sdk/utils/abi/coders/abstract-coder.d.ts +52 -0
- package/dist/bop-sdk/utils/abi/coders/abstract-coder.js +164 -0
- package/dist/bop-sdk/utils/abi/coders/abstract-coder.js.map +1 -0
- package/dist/bop-sdk/utils/abi/coders/address.d.ts +7 -0
- package/dist/bop-sdk/utils/abi/coders/address.js +52 -0
- package/dist/bop-sdk/utils/abi/coders/address.js.map +1 -0
- package/dist/bop-sdk/utils/abi/coders/anonymous.d.ts +8 -0
- package/dist/bop-sdk/utils/abi/coders/anonymous.js +22 -0
- package/dist/bop-sdk/utils/abi/coders/anonymous.js.map +1 -0
- package/dist/bop-sdk/utils/abi/coders/array.d.ts +13 -0
- package/dist/bop-sdk/utils/abi/coders/array.js +220 -0
- package/dist/bop-sdk/utils/abi/coders/array.js.map +1 -0
- package/dist/bop-sdk/utils/abi/coders/boolean.d.ts +7 -0
- package/dist/bop-sdk/utils/abi/coders/boolean.js +20 -0
- package/dist/bop-sdk/utils/abi/coders/boolean.js.map +1 -0
- package/dist/bop-sdk/utils/abi/coders/bytes.d.ts +11 -0
- package/dist/bop-sdk/utils/abi/coders/bytes.js +33 -0
- package/dist/bop-sdk/utils/abi/coders/bytes.js.map +1 -0
- package/dist/bop-sdk/utils/abi/coders/fixed-bytes.d.ts +9 -0
- package/dist/bop-sdk/utils/abi/coders/fixed-bytes.js +28 -0
- package/dist/bop-sdk/utils/abi/coders/fixed-bytes.js.map +1 -0
- package/dist/bop-sdk/utils/abi/coders/null.d.ts +7 -0
- package/dist/bop-sdk/utils/abi/coders/null.js +24 -0
- package/dist/bop-sdk/utils/abi/coders/null.js.map +1 -0
- package/dist/bop-sdk/utils/abi/coders/number.d.ts +10 -0
- package/dist/bop-sdk/utils/abi/coders/number.js +45 -0
- package/dist/bop-sdk/utils/abi/coders/number.js.map +1 -0
- package/dist/bop-sdk/utils/abi/coders/string.d.ts +8 -0
- package/dist/bop-sdk/utils/abi/coders/string.js +21 -0
- package/dist/bop-sdk/utils/abi/coders/string.js.map +1 -0
- package/dist/bop-sdk/utils/abi/coders/tuple.d.ts +10 -0
- package/dist/bop-sdk/utils/abi/coders/tuple.js +60 -0
- package/dist/bop-sdk/utils/abi/coders/tuple.js.map +1 -0
- package/dist/bop-sdk/utils/abi/constants/addresses.d.ts +1 -0
- package/dist/bop-sdk/utils/abi/constants/addresses.js +5 -0
- package/dist/bop-sdk/utils/abi/constants/addresses.js.map +1 -0
- package/dist/bop-sdk/utils/abi/constants/bignumbers.d.ts +10 -0
- package/dist/bop-sdk/utils/abi/constants/bignumbers.js +21 -0
- package/dist/bop-sdk/utils/abi/constants/bignumbers.js.map +1 -0
- package/dist/bop-sdk/utils/abi/constants/hashes.d.ts +1 -0
- package/dist/bop-sdk/utils/abi/constants/hashes.js +5 -0
- package/dist/bop-sdk/utils/abi/constants/hashes.js.map +1 -0
- package/dist/bop-sdk/utils/abi/constants/index.d.ts +4 -0
- package/dist/bop-sdk/utils/abi/constants/index.js +19 -0
- package/dist/bop-sdk/utils/abi/constants/index.js.map +1 -0
- package/dist/bop-sdk/utils/abi/constants/strings.d.ts +1 -0
- package/dist/bop-sdk/utils/abi/constants/strings.js +6 -0
- package/dist/bop-sdk/utils/abi/constants/strings.js.map +1 -0
- package/dist/bop-sdk/utils/abi/fragments.d.ts +84 -0
- package/dist/bop-sdk/utils/abi/fragments.js +919 -0
- package/dist/bop-sdk/utils/abi/fragments.js.map +1 -0
- package/dist/bop-sdk/utils/abi/id.d.ts +1 -0
- package/dist/bop-sdk/utils/abi/id.js +10 -0
- package/dist/bop-sdk/utils/abi/id.js.map +1 -0
- package/dist/bop-sdk/utils/abi/index.d.ts +4 -0
- package/dist/bop-sdk/utils/abi/index.js +21 -0
- package/dist/bop-sdk/utils/abi/index.js.map +1 -0
- package/dist/bop-sdk/utils/abi/interface.d.ts +83 -0
- package/dist/bop-sdk/utils/abi/interface.js +663 -0
- package/dist/bop-sdk/utils/abi/interface.js.map +1 -0
- package/dist/bop-sdk/utils/abi/keccak256.d.ts +2 -0
- package/dist/bop-sdk/utils/abi/keccak256.js +13 -0
- package/dist/bop-sdk/utils/abi/keccak256.js.map +1 -0
- package/dist/bop-sdk/utils/abi/properties.d.ts +16 -0
- package/dist/bop-sdk/utils/abi/properties.js +141 -0
- package/dist/bop-sdk/utils/abi/properties.js.map +1 -0
- package/dist/bop-sdk/utils/abi/strings/bytes32.d.ts +3 -0
- package/dist/bop-sdk/utils/abi/strings/bytes32.js +36 -0
- package/dist/bop-sdk/utils/abi/strings/bytes32.js.map +1 -0
- package/dist/bop-sdk/utils/abi/strings/idna.d.ts +4 -0
- package/dist/bop-sdk/utils/abi/strings/idna.js +200 -0
- package/dist/bop-sdk/utils/abi/strings/idna.js.map +1 -0
- package/dist/bop-sdk/utils/abi/strings/index.d.ts +4 -0
- package/dist/bop-sdk/utils/abi/strings/index.js +17 -0
- package/dist/bop-sdk/utils/abi/strings/index.js.map +1 -0
- package/dist/bop-sdk/utils/abi/strings/utf8.d.ts +26 -0
- package/dist/bop-sdk/utils/abi/strings/utf8.js +265 -0
- package/dist/bop-sdk/utils/abi/strings/utf8.js.map +1 -0
- package/dist/bop-sdk/utils/encryption-address.d.ts +25 -0
- package/dist/bop-sdk/utils/encryption-address.js +426 -0
- package/dist/bop-sdk/utils/encryption-address.js.map +1 -0
- package/dist/bop-sdk/utils/encryption-crypto.d.ts +16 -0
- package/dist/bop-sdk/utils/encryption-crypto.js +406 -0
- package/dist/bop-sdk/utils/encryption-crypto.js.map +1 -0
- package/dist/bop-sdk/utils/encryption-mnemonics.d.ts +7 -0
- package/dist/bop-sdk/utils/encryption-mnemonics.js +129 -0
- package/dist/bop-sdk/utils/encryption-mnemonics.js.map +1 -0
- package/dist/bop-sdk/utils/index.d.ts +13 -0
- package/dist/bop-sdk/utils/index.js +22 -0
- package/dist/bop-sdk/utils/index.js.map +1 -0
- package/dist/bop-sdk/utils/logger.d.ts +52 -0
- package/dist/bop-sdk/utils/logger.js +377 -0
- package/dist/bop-sdk/utils/logger.js.map +1 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +18 -0
- package/dist/index.js.map +1 -0
- package/package.json +91 -87
- package/tsconfig.json +24 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"abstract-provider.js","sourceRoot":"","sources":["../../../../src/bop-sdk/interface/abstract-service/abstract-provider.ts"],"names":[],"mappings":";;;AAMA,MAAsB,QAAQ;CAM7B;AAND,4BAMC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { CallContractResponse, GetAccountBalanceResponse, GetAccountIncreaseNonceResponse, SignerSignResponse, LedgerNumberResponse, GetAccountResponse } from "../../../bop-sdk/proto/bop-sdk-interface";
|
|
2
|
+
import { Provider } from "./abstract-provider";
|
|
3
|
+
export declare abstract class Signer {
|
|
4
|
+
provider?: Provider;
|
|
5
|
+
readonly _isSigner: boolean;
|
|
6
|
+
constructor();
|
|
7
|
+
_checkProvider(operation?: string): string;
|
|
8
|
+
abstract connect(provider: Provider): Signer;
|
|
9
|
+
static isSigner(value: any): value is Signer;
|
|
10
|
+
abstract getAddress(): string;
|
|
11
|
+
abstract signTransaction(message: string): Promise<SignerSignResponse>;
|
|
12
|
+
getAccount(address?: string): Promise<GetAccountResponse>;
|
|
13
|
+
getLedgerNumber(): Promise<LedgerNumberResponse>;
|
|
14
|
+
getBalance(): Promise<GetAccountBalanceResponse>;
|
|
15
|
+
getIncreaseNonce(): Promise<GetAccountIncreaseNonceResponse>;
|
|
16
|
+
callContract(sourceAddress: string, input: string): Promise<CallContractResponse>;
|
|
17
|
+
}
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.Signer = void 0;
|
|
13
|
+
const bop_sdk_common_1 = require("../../../bop-sdk/proto/bop-sdk-common");
|
|
14
|
+
function defineReadOnly(object, name, value) {
|
|
15
|
+
Object.defineProperty(object, name, {
|
|
16
|
+
enumerable: true,
|
|
17
|
+
value: value,
|
|
18
|
+
writable: false,
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
class Signer {
|
|
22
|
+
constructor() {
|
|
23
|
+
defineReadOnly(this, "_isSigner", true);
|
|
24
|
+
}
|
|
25
|
+
_checkProvider(operation) {
|
|
26
|
+
if (!this.provider) {
|
|
27
|
+
if (operation === undefined)
|
|
28
|
+
return "unconnected provider";
|
|
29
|
+
else
|
|
30
|
+
return operation + " unconnected provider";
|
|
31
|
+
}
|
|
32
|
+
return "ok";
|
|
33
|
+
}
|
|
34
|
+
static isSigner(value) {
|
|
35
|
+
return !!(value && value._isSigner);
|
|
36
|
+
}
|
|
37
|
+
getAccount(address) {
|
|
38
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
39
|
+
if (this._checkProvider("getAccount") !== "ok") {
|
|
40
|
+
const response = {
|
|
41
|
+
errorCode: bop_sdk_common_1.SdkStatusCode.UNCONNECTED_PROVIDER,
|
|
42
|
+
errorDesc: this._checkProvider("getAccount"),
|
|
43
|
+
};
|
|
44
|
+
return response;
|
|
45
|
+
}
|
|
46
|
+
if (address === undefined)
|
|
47
|
+
return (yield this.provider.account.getAccount(this.getAddress()));
|
|
48
|
+
else
|
|
49
|
+
return (yield this.provider.account.getAccount(address));
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
getLedgerNumber() {
|
|
53
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
54
|
+
if (this._checkProvider("getLedgerNumber") !== "ok") {
|
|
55
|
+
const response = {
|
|
56
|
+
errorCode: bop_sdk_common_1.SdkStatusCode.UNCONNECTED_PROVIDER,
|
|
57
|
+
errorDesc: this._checkProvider("getLedgerNumber"),
|
|
58
|
+
};
|
|
59
|
+
return response;
|
|
60
|
+
}
|
|
61
|
+
return (yield this.provider.ledger.getLedgerNumber());
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
getBalance() {
|
|
65
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
66
|
+
if (this._checkProvider("getBalance") !== "ok") {
|
|
67
|
+
const response = {
|
|
68
|
+
errorCode: bop_sdk_common_1.SdkStatusCode.UNCONNECTED_PROVIDER,
|
|
69
|
+
errorDesc: this._checkProvider("getBalance"),
|
|
70
|
+
};
|
|
71
|
+
return response;
|
|
72
|
+
}
|
|
73
|
+
return (yield this.provider.account.getAccountBalance(this.getAddress()));
|
|
74
|
+
});
|
|
75
|
+
}
|
|
76
|
+
getIncreaseNonce() {
|
|
77
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
78
|
+
if (this._checkProvider("getIncreaseNonce") !== "ok") {
|
|
79
|
+
const response = {
|
|
80
|
+
errorCode: bop_sdk_common_1.SdkStatusCode.UNCONNECTED_PROVIDER,
|
|
81
|
+
errorDesc: this._checkProvider("getIncreaseNonce"),
|
|
82
|
+
};
|
|
83
|
+
return response;
|
|
84
|
+
}
|
|
85
|
+
return (yield this.provider.account.getAccountIncreaseNonce(this.getAddress()));
|
|
86
|
+
});
|
|
87
|
+
}
|
|
88
|
+
callContract(sourceAddress, input) {
|
|
89
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
90
|
+
if (this._checkProvider("callContract") !== "ok") {
|
|
91
|
+
const response = {
|
|
92
|
+
errorCode: bop_sdk_common_1.SdkStatusCode.UNCONNECTED_PROVIDER,
|
|
93
|
+
errorDesc: this._checkProvider("callContract"),
|
|
94
|
+
};
|
|
95
|
+
return response;
|
|
96
|
+
}
|
|
97
|
+
const transaction = {
|
|
98
|
+
contractAddress: sourceAddress,
|
|
99
|
+
input: input,
|
|
100
|
+
gasPrice: 1,
|
|
101
|
+
sourceAddress: this.getAddress(),
|
|
102
|
+
optType: 2, //query
|
|
103
|
+
};
|
|
104
|
+
return (yield this.provider.contract.callContract(transaction));
|
|
105
|
+
});
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
exports.Signer = Signer;
|
|
109
|
+
//# sourceMappingURL=abstract-signer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"abstract-signer.js","sourceRoot":"","sources":["../../../../src/bop-sdk/interface/abstract-service/abstract-signer.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { GetTxPoolSizeResponse, GetTransactionCacheResponse, GetTransactionHistoryResponse, OffLineTxResponse, OpCreateAccountParams, OpCreateContractParams, OpGasSendParams, OpContractInvokeParams, OpSetMetadataParams, OpSetPrivParams, OpBatchGasSend, OpBatchContractInvoke, SubmitTransactionParams, SubmitTransactionResponse, TestTransactionRequest, TestTransactionResponse } from "bop-sdk/proto/bop-sdk-interface";
|
|
2
|
+
import { Signer } from "./abstract-signer";
|
|
3
|
+
export declare abstract class transaction {
|
|
4
|
+
abstract getTxPoolSize(): Promise<GetTxPoolSizeResponse>;
|
|
5
|
+
abstract getTxPoolTransactions(limit?: number, address?: string, hash?: string): Promise<GetTransactionCacheResponse>;
|
|
6
|
+
abstract getTransactionHistory(seq?: number, start?: number, limit?: number, hash?: string): Promise<GetTransactionHistoryResponse>;
|
|
7
|
+
abstract buildAccountCreateTx(params: OpCreateAccountParams, signer: Signer[], sourceAddress?: string): Promise<OffLineTxResponse>;
|
|
8
|
+
abstract buildContractCreateTx(params: OpCreateContractParams, signer: Signer[], sourceAddress?: string): Promise<OffLineTxResponse>;
|
|
9
|
+
abstract buildGasSendTx(params: OpGasSendParams, signer: Signer[], sourceAddress?: string): Promise<OffLineTxResponse>;
|
|
10
|
+
abstract buildContractInvokeTx(params: OpContractInvokeParams, signer: Signer[], sourceAddress?: string): Promise<OffLineTxResponse>;
|
|
11
|
+
abstract buildSetMetadataTx(params: OpSetMetadataParams, signer: Signer[], sourceAddress?: string): Promise<OffLineTxResponse>;
|
|
12
|
+
abstract buildSetPrivilegeTx(params: OpSetPrivParams, signer: Signer[], sourceAddress?: string): Promise<OffLineTxResponse>;
|
|
13
|
+
abstract buildBatchGasSend(params: OpBatchGasSend, signer: Signer[], sourceAddress?: string): Promise<OffLineTxResponse>;
|
|
14
|
+
abstract buildBatchContractInvoke(params: OpBatchContractInvoke, signer: Signer[], sourceAddress?: string): Promise<OffLineTxResponse>;
|
|
15
|
+
abstract submitTransaction(params: SubmitTransactionParams): Promise<SubmitTransactionResponse>;
|
|
16
|
+
abstract estimateGas(transaction: TestTransactionRequest): Promise<TestTransactionResponse>;
|
|
17
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"abstract-transaction.js","sourceRoot":"","sources":["../../../../src/bop-sdk/interface/abstract-service/abstract-transaction.ts"],"names":[],"mappings":";;;AAoBA,MAAsB,WAAW;CAiEhC;AAjED,kCAiEC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.WsProviderByBop = void 0;
|
|
4
|
+
const bop_ws_1 = require("../../bop/bop-ws");
|
|
5
|
+
//未拓展新功能,直接接入Bop平台的ws
|
|
6
|
+
class WsProviderByBop {
|
|
7
|
+
constructor(config) {
|
|
8
|
+
this.bop = new bop_ws_1.BopWsInterface(config.url, config.heartBeatInterval);
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
exports.WsProviderByBop = WsProviderByBop;
|
|
12
|
+
//# sourceMappingURL=provider-ws.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"provider-ws.js","sourceRoot":"","sources":["../../../src/bop-sdk/interface/provider-ws.ts"],"names":[],"mappings":";;;AAAA,6CAA4D;AAE5D,qBAAqB;AACrB,MAAa,eAAe;IAG1B,YAAY,MAAgB;QAC1B,IAAI,CAAC,GAAG,GAAG,IAAI,uBAAc,CAAC,MAAM,CAAC,GAAG,EAAE,MAAM,CAAC,iBAAiB,CAAC,CAAC;IACtE,CAAC;CACF;AAND,0CAMC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Provider } from "./abstract-service/abstract-provider";
|
|
2
|
+
import { BopInterface } from "../../bop/bop-base";
|
|
3
|
+
import { BopByBop } from "./service/3rd";
|
|
4
|
+
export declare class ProviderByBop extends Provider {
|
|
5
|
+
bop: BopByBop;
|
|
6
|
+
constructor(bop: BopInterface);
|
|
7
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ProviderByBop = void 0;
|
|
4
|
+
const abstract_provider_1 = require("./abstract-service/abstract-provider");
|
|
5
|
+
const chain_1 = require("./service/chain");
|
|
6
|
+
const ledger_1 = require("./service/ledger");
|
|
7
|
+
const account_1 = require("./service/account");
|
|
8
|
+
const transaction_1 = require("./service/transaction");
|
|
9
|
+
const contract_1 = require("./service/contract");
|
|
10
|
+
const _3rd_1 = require("./service/3rd");
|
|
11
|
+
class ProviderByBop extends abstract_provider_1.Provider {
|
|
12
|
+
constructor(bop) {
|
|
13
|
+
super();
|
|
14
|
+
this.chain = new chain_1.ChainByBop(bop);
|
|
15
|
+
this.ledger = new ledger_1.LedgerByBop(bop);
|
|
16
|
+
this.account = new account_1.AccountByBop(bop);
|
|
17
|
+
this.transaction = new transaction_1.TransactionByBop(bop);
|
|
18
|
+
this.contract = new contract_1.ContractByBop(bop);
|
|
19
|
+
this.bop = new _3rd_1.BopByBop(bop);
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
exports.ProviderByBop = ProviderByBop;
|
|
23
|
+
//# sourceMappingURL=provider.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"provider.js","sourceRoot":"","sources":["../../../src/bop-sdk/interface/provider.ts"],"names":[],"mappings":";;;AAAA,4EAAgE;AAEhE,2CAA6C;AAC7C,6CAA+C;AAC/C,+CAAiD;AACjD,uDAAyD;AACzD,iDAAmD;AACnD,wCAAyC;AAEzC,MAAa,aAAc,SAAQ,4BAAQ;IAGzC,YAAY,GAAiB;QAC3B,KAAK,EAAE,CAAC;QACR,IAAI,CAAC,KAAK,GAAG,IAAI,kBAAU,CAAC,GAAG,CAAC,CAAC;QACjC,IAAI,CAAC,MAAM,GAAG,IAAI,oBAAW,CAAC,GAAG,CAAC,CAAC;QACnC,IAAI,CAAC,OAAO,GAAG,IAAI,sBAAY,CAAC,GAAG,CAAC,CAAC;QACrC,IAAI,CAAC,WAAW,GAAG,IAAI,8BAAgB,CAAC,GAAG,CAAC,CAAC;QAC7C,IAAI,CAAC,QAAQ,GAAG,IAAI,wBAAa,CAAC,GAAG,CAAC,CAAC;QACvC,IAAI,CAAC,GAAG,GAAG,IAAI,eAAQ,CAAC,GAAG,CAAC,CAAC;IAC/B,CAAC;CACF;AAZD,sCAYC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { BopInterface } from "../../../bop/bop-base";
|
|
2
|
+
import { ApplyRequest, ApplyResponse, ApplyStatusRequest, ApplyStatusResponse, DetailRequest, DetailResponse, GetTransactionCacheRequest, GetTransactionCachePlatResponse, DiscardRequest, DiscardResponse, QueryRequest, QueryResponse } from "../../../bop/bop-proto/bop";
|
|
3
|
+
export declare class BopByBop {
|
|
4
|
+
readonly bopInterface: BopInterface;
|
|
5
|
+
constructor(bop: BopInterface);
|
|
6
|
+
apply(params: ApplyRequest): Promise<ApplyResponse>;
|
|
7
|
+
status(params: ApplyStatusRequest): Promise<ApplyStatusResponse>;
|
|
8
|
+
detail(params: DetailRequest): Promise<DetailResponse>;
|
|
9
|
+
getTransactionCache(params: GetTransactionCacheRequest): Promise<GetTransactionCachePlatResponse>;
|
|
10
|
+
discard(params: DiscardRequest): Promise<DiscardResponse>;
|
|
11
|
+
query(params: QueryRequest): Promise<QueryResponse>;
|
|
12
|
+
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.BopByBop = void 0;
|
|
13
|
+
class BopByBop {
|
|
14
|
+
constructor(bop) {
|
|
15
|
+
this.bopInterface = bop;
|
|
16
|
+
}
|
|
17
|
+
apply(params) {
|
|
18
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
19
|
+
return this.bopInterface.callService("permit_apply", params);
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
status(params) {
|
|
23
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
24
|
+
return this.bopInterface.callService("permit_status", params);
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
detail(params) {
|
|
28
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
29
|
+
return this.bopInterface.callService("permit_detail", params);
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
getTransactionCache(params) {
|
|
33
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
34
|
+
return this.bopInterface.callService("base_getTransactionCachePlat", params);
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
discard(params) {
|
|
38
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
39
|
+
return this.bopInterface.callService("base_discard", params);
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
query(params) {
|
|
43
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
44
|
+
return this.bopInterface.callService("base_query", params);
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
exports.BopByBop = BopByBop;
|
|
49
|
+
//# sourceMappingURL=3rd.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"3rd.js","sourceRoot":"","sources":["../../../../src/bop-sdk/interface/service/3rd.ts"],"names":[],"mappings":";;;;;;;;;;;;AAgBA,MAAa,QAAQ;IAGnB,YAAY,GAAiB;QAC3B,IAAI,CAAC,YAAY,GAAG,GAAG,CAAC;IAC1B,CAAC;IAEY,KAAK,CAAC,MAAoB;;YACrC,OAAO,IAAI,CAAC,YAAY,CAAC,WAAW,CAAC,cAAc,EAAE,MAAM,CAAC,CAAC;QAC/D,CAAC;KAAA;IAEY,MAAM,CACjB,MAA0B;;YAE1B,OAAO,IAAI,CAAC,YAAY,CAAC,WAAW,CAAC,eAAe,EAAE,MAAM,CAAC,CAAC;QAChE,CAAC;KAAA;IAEY,MAAM,CAAC,MAAqB;;YACvC,OAAO,IAAI,CAAC,YAAY,CAAC,WAAW,CAAC,eAAe,EAAE,MAAM,CAAC,CAAC;QAChE,CAAC;KAAA;IAEY,mBAAmB,CAC9B,MAAkC;;YAElC,OAAO,IAAI,CAAC,YAAY,CAAC,WAAW,CAClC,8BAA8B,EAC9B,MAAM,CACP,CAAC;QACJ,CAAC;KAAA;IAEY,OAAO,CAAC,MAAsB;;YACzC,OAAO,IAAI,CAAC,YAAY,CAAC,WAAW,CAAC,cAAc,EAAE,MAAM,CAAC,CAAC;QAC/D,CAAC;KAAA;IAEY,KAAK,CAAC,MAAoB;;YACrC,OAAO,IAAI,CAAC,YAAY,CAAC,WAAW,CAAC,YAAY,EAAE,MAAM,CAAC,CAAC;QAC7D,CAAC;KAAA;CACF;AArCD,4BAqCC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { GetAccountBalanceResponse, GetAccountIncreaseNonceResponse, GetAccountMetadataResponse, GetAccountPrivResponse, GetAccountResponse } from "../../../bop-sdk/proto/bop-sdk-interface";
|
|
2
|
+
import { BopInterface } from "../../../bop/bop-base";
|
|
3
|
+
import { account } from "../abstract-service/abstract-account";
|
|
4
|
+
export declare class AccountByBop extends account {
|
|
5
|
+
readonly bopInterface: BopInterface;
|
|
6
|
+
constructor(bop: BopInterface);
|
|
7
|
+
getAccount(address: string): Promise<GetAccountResponse>;
|
|
8
|
+
getAccountMetadata(address: string, seq?: number, key?: string): Promise<GetAccountMetadataResponse>;
|
|
9
|
+
getAccountIncreaseNonce(address: string): Promise<GetAccountIncreaseNonceResponse>;
|
|
10
|
+
getAccountBalance(address: string): Promise<GetAccountBalanceResponse>;
|
|
11
|
+
getAccountPriv(address: string): Promise<GetAccountPrivResponse>;
|
|
12
|
+
}
|
|
@@ -0,0 +1,98 @@
|
|
|
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
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
26
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
27
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
28
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
29
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
30
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
31
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
32
|
+
});
|
|
33
|
+
};
|
|
34
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
35
|
+
exports.AccountByBop = void 0;
|
|
36
|
+
const abstract_account_1 = require("../abstract-service/abstract-account");
|
|
37
|
+
const trans = __importStar(require("./helper"));
|
|
38
|
+
const bop_sdk_common_1 = require("../../../bop-sdk/proto/bop-sdk-common");
|
|
39
|
+
class AccountByBop extends abstract_account_1.account {
|
|
40
|
+
constructor(bop) {
|
|
41
|
+
super();
|
|
42
|
+
this.bopInterface = bop;
|
|
43
|
+
}
|
|
44
|
+
getAccount(address) {
|
|
45
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
46
|
+
const request = {
|
|
47
|
+
address: address,
|
|
48
|
+
};
|
|
49
|
+
return trans.AccountAccountResultToAccountInfo(yield this.bopInterface.callService("base_getAccountBase", request));
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
getAccountMetadata(address, seq, key) {
|
|
53
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
54
|
+
let request = {
|
|
55
|
+
address: address,
|
|
56
|
+
};
|
|
57
|
+
if (seq !== undefined)
|
|
58
|
+
request.height = seq;
|
|
59
|
+
if (key !== undefined) {
|
|
60
|
+
request.key = key;
|
|
61
|
+
if (key.length < 1 || key.length > 1024) {
|
|
62
|
+
let response = {
|
|
63
|
+
errorCode: bop_sdk_common_1.SdkStatusCode.INVALID_DATAKEY_ERROR,
|
|
64
|
+
errorDesc: "The length of key must be between 1 and 1024",
|
|
65
|
+
};
|
|
66
|
+
return response;
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
return trans.AccountAccountToAccountMetadatas(yield this.bopInterface.callService("base_getAccount", request));
|
|
70
|
+
});
|
|
71
|
+
}
|
|
72
|
+
getAccountIncreaseNonce(address) {
|
|
73
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
74
|
+
const request = {
|
|
75
|
+
address: address,
|
|
76
|
+
};
|
|
77
|
+
return trans.AccountAccountResultToIncreaseNonce(yield this.bopInterface.callService("base_getAccountBase", request));
|
|
78
|
+
});
|
|
79
|
+
}
|
|
80
|
+
getAccountBalance(address) {
|
|
81
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
82
|
+
const request = {
|
|
83
|
+
address: address,
|
|
84
|
+
};
|
|
85
|
+
return trans.AccountAccountResultToBalance(yield this.bopInterface.callService("base_getAccountBase", request));
|
|
86
|
+
});
|
|
87
|
+
}
|
|
88
|
+
getAccountPriv(address) {
|
|
89
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
90
|
+
const request = {
|
|
91
|
+
address: address,
|
|
92
|
+
};
|
|
93
|
+
return trans.AccountAccountResultToPriv(yield this.bopInterface.callService("base_getAccountBase", request));
|
|
94
|
+
});
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
exports.AccountByBop = AccountByBop;
|
|
98
|
+
//# sourceMappingURL=account.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"account.js","sourceRoot":"","sources":["../../../../src/bop-sdk/interface/service/account.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AASA,2EAA+D;AAC/D,gDAAkC;AAClC,0EAAsE;AAEtE,MAAa,YAAa,SAAQ,0BAAO;IAEvC,YAAY,GAAiB;QAC3B,KAAK,EAAE,CAAC;QACR,IAAI,CAAC,YAAY,GAAG,GAAG,CAAC;IAC1B,CAAC;IAEY,UAAU,CAAC,OAAe;;YACrC,MAAM,OAAO,GAA0B;gBACrC,OAAO,EAAE,OAAO;aACjB,CAAC;YACF,OAAO,KAAK,CAAC,iCAAiC,CAC5C,MAAM,IAAI,CAAC,YAAY,CAAC,WAAW,CAAC,qBAAqB,EAAE,OAAO,CAAC,CACpE,CAAC;QACJ,CAAC;KAAA;IAEY,kBAAkB,CAC7B,OAAe,EACf,GAAY,EACZ,GAAY;;YAEZ,IAAI,OAAO,GAAsB;gBAC/B,OAAO,EAAE,OAAO;aACjB,CAAC;YACF,IAAI,GAAG,KAAK,SAAS;gBAAE,OAAO,CAAC,MAAM,GAAG,GAAG,CAAC;YAC5C,IAAI,GAAG,KAAK,SAAS,EAAE;gBACrB,OAAO,CAAC,GAAG,GAAG,GAAG,CAAC;gBAClB,IAAI,GAAG,CAAC,MAAM,GAAG,CAAC,IAAI,GAAG,CAAC,MAAM,GAAG,IAAI,EAAE;oBACvC,IAAI,QAAQ,GAA+B;wBACzC,SAAS,EAAE,8BAAa,CAAC,qBAAqB;wBAC9C,SAAS,EAAE,8CAA8C;qBAC1D,CAAC;oBACF,OAAO,QAAQ,CAAC;iBACjB;aACF;YACD,OAAO,KAAK,CAAC,gCAAgC,CAC3C,MAAM,IAAI,CAAC,YAAY,CAAC,WAAW,CAAC,iBAAiB,EAAE,OAAO,CAAC,CAChE,CAAC;QACJ,CAAC;KAAA;IAEY,uBAAuB,CAClC,OAAe;;YAEf,MAAM,OAAO,GAA0B;gBACrC,OAAO,EAAE,OAAO;aACjB,CAAC;YACF,OAAO,KAAK,CAAC,mCAAmC,CAC9C,MAAM,IAAI,CAAC,YAAY,CAAC,WAAW,CAAC,qBAAqB,EAAE,OAAO,CAAC,CACpE,CAAC;QACJ,CAAC;KAAA;IAEY,iBAAiB,CAC5B,OAAe;;YAEf,MAAM,OAAO,GAA0B;gBACrC,OAAO,EAAE,OAAO;aACjB,CAAC;YACF,OAAO,KAAK,CAAC,6BAA6B,CACxC,MAAM,IAAI,CAAC,YAAY,CAAC,WAAW,CAAC,qBAAqB,EAAE,OAAO,CAAC,CACpE,CAAC;QACJ,CAAC;KAAA;IAEY,cAAc,CACzB,OAAe;;YAEf,MAAM,OAAO,GAA0B;gBACrC,OAAO,EAAE,OAAO;aACjB,CAAC;YACF,OAAO,KAAK,CAAC,0BAA0B,CACrC,MAAM,IAAI,CAAC,YAAY,CAAC,WAAW,CAAC,qBAAqB,EAAE,OAAO,CAAC,CACpE,CAAC;QACJ,CAAC;KAAA;CACF;AAxED,oCAwEC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { GetChainInfoResponse, GetNetworkIdResponse } from "../../../bop-sdk/proto/bop-sdk-interface";
|
|
2
|
+
import { BopInterface } from "../../../bop/bop-base";
|
|
3
|
+
import { chain } from "../abstract-service/abstract-chain";
|
|
4
|
+
export declare class ChainByBop extends chain {
|
|
5
|
+
readonly bopInterface: BopInterface;
|
|
6
|
+
constructor(bop: BopInterface);
|
|
7
|
+
getChainInfo(): Promise<GetChainInfoResponse>;
|
|
8
|
+
getNetworkId(): Promise<GetNetworkIdResponse>;
|
|
9
|
+
}
|
|
@@ -0,0 +1,55 @@
|
|
|
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
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
26
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
27
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
28
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
29
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
30
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
31
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
32
|
+
});
|
|
33
|
+
};
|
|
34
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
35
|
+
exports.ChainByBop = void 0;
|
|
36
|
+
const abstract_chain_1 = require("../abstract-service/abstract-chain");
|
|
37
|
+
const trans = __importStar(require("./helper"));
|
|
38
|
+
class ChainByBop extends abstract_chain_1.chain {
|
|
39
|
+
constructor(bop) {
|
|
40
|
+
super();
|
|
41
|
+
this.bopInterface = bop;
|
|
42
|
+
}
|
|
43
|
+
getChainInfo() {
|
|
44
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
45
|
+
return trans.ChainHelloToChainInfo(yield this.bopInterface.callService("base_hello"));
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
getNetworkId() {
|
|
49
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
50
|
+
return trans.ChainHelloToNetworkId(yield this.bopInterface.callService("base_hello"));
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
exports.ChainByBop = ChainByBop;
|
|
55
|
+
//# sourceMappingURL=chain.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chain.js","sourceRoot":"","sources":["../../../../src/bop-sdk/interface/service/chain.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAKA,uEAA2D;AAC3D,gDAAkC;AAElC,MAAa,UAAW,SAAQ,sBAAK;IAEnC,YAAY,GAAiB;QAC3B,KAAK,EAAE,CAAC;QACR,IAAI,CAAC,YAAY,GAAG,GAAG,CAAC;IAC1B,CAAC;IAEY,YAAY;;YACvB,OAAO,KAAK,CAAC,qBAAqB,CAChC,MAAM,IAAI,CAAC,YAAY,CAAC,WAAW,CAAC,YAAY,CAAC,CAClD,CAAC;QACJ,CAAC;KAAA;IAEY,YAAY;;YACvB,OAAO,KAAK,CAAC,qBAAqB,CAChC,MAAM,IAAI,CAAC,YAAY,CAAC,WAAW,CAAC,YAAY,CAAC,CAClD,CAAC;QACJ,CAAC;KAAA;CACF;AAlBD,gCAkBC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { CheckContractAccountResponse, GetContractInfoResponse, CallContractRequest, CallContractResponse } from "../../../bop-sdk/proto/bop-sdk-interface";
|
|
2
|
+
import { BopInterface } from "../../../bop/bop-base";
|
|
3
|
+
import { contract } from "../abstract-service/abstract-contract";
|
|
4
|
+
export declare class ContractByBop extends contract {
|
|
5
|
+
readonly bopInterface: BopInterface;
|
|
6
|
+
constructor(bop: BopInterface);
|
|
7
|
+
checkContractAccount(address: string): Promise<CheckContractAccountResponse>;
|
|
8
|
+
getContractInfo(address: string): Promise<GetContractInfoResponse>;
|
|
9
|
+
callContract(transaction: CallContractRequest): Promise<CallContractResponse>;
|
|
10
|
+
}
|
|
@@ -0,0 +1,67 @@
|
|
|
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
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
26
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
27
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
28
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
29
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
30
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
31
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
32
|
+
});
|
|
33
|
+
};
|
|
34
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
35
|
+
exports.ContractByBop = void 0;
|
|
36
|
+
const abstract_contract_1 = require("../abstract-service/abstract-contract");
|
|
37
|
+
const trans = __importStar(require("./helper"));
|
|
38
|
+
class ContractByBop extends abstract_contract_1.contract {
|
|
39
|
+
constructor(bop) {
|
|
40
|
+
super();
|
|
41
|
+
this.bopInterface = bop;
|
|
42
|
+
}
|
|
43
|
+
checkContractAccount(address) {
|
|
44
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
45
|
+
const request = {
|
|
46
|
+
address: address,
|
|
47
|
+
};
|
|
48
|
+
return trans.ContractAccountResultToCheckContractAccount(yield this.bopInterface.callService("base_getAccountBase", request));
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
getContractInfo(address) {
|
|
52
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
53
|
+
const request = {
|
|
54
|
+
address: address,
|
|
55
|
+
};
|
|
56
|
+
return trans.ContractAccountResultToGetContractInfo(yield this.bopInterface.callService("base_getAccountBase", request));
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
callContract(transaction) {
|
|
60
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
61
|
+
transaction.optType = 2;
|
|
62
|
+
return yield this.bopInterface.callService("base_callContract", transaction);
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
exports.ContractByBop = ContractByBop;
|
|
67
|
+
//# sourceMappingURL=contract.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"contract.js","sourceRoot":"","sources":["../../../../src/bop-sdk/interface/service/contract.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAQA,6EAAiE;AACjE,gDAAkC;AAElC,MAAa,aAAc,SAAQ,4BAAQ;IAEzC,YAAY,GAAiB;QAC3B,KAAK,EAAE,CAAC;QACR,IAAI,CAAC,YAAY,GAAG,GAAG,CAAC;IAC1B,CAAC;IAEY,oBAAoB,CAC/B,OAAe;;YAEf,MAAM,OAAO,GAA0B;gBACrC,OAAO,EAAE,OAAO;aACjB,CAAC;YACF,OAAO,KAAK,CAAC,2CAA2C,CACtD,MAAM,IAAI,CAAC,YAAY,CAAC,WAAW,CAAC,qBAAqB,EAAE,OAAO,CAAC,CACpE,CAAC;QACJ,CAAC;KAAA;IAEY,eAAe,CAC1B,OAAe;;YAEf,MAAM,OAAO,GAA0B;gBACrC,OAAO,EAAE,OAAO;aACjB,CAAC;YACF,OAAO,KAAK,CAAC,sCAAsC,CACjD,MAAM,IAAI,CAAC,YAAY,CAAC,WAAW,CAAC,qBAAqB,EAAE,OAAO,CAAC,CACpE,CAAC;QACJ,CAAC;KAAA;IAEY,YAAY,CACvB,WAAgC;;YAEhC,WAAW,CAAC,OAAO,GAAG,CAAC,CAAC;YAExB,OAAO,MAAM,IAAI,CAAC,YAAY,CAAC,WAAW,CACxC,mBAAmB,EACnB,WAAW,CACZ,CAAC;QACJ,CAAC;KAAA;CACF;AAvCD,sCAuCC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { GetChainInfoResponse, GetNetworkIdResponse, LedgerResponse, LedgerNumberResponse, LedgerLeaderResponse, LedgerValidatorsResponse, LedgerTxHashesResponse, GetAccountBalanceResponse, GetAccountIncreaseNonceResponse, GetAccountMetadataResponse, GetAccountPrivResponse, GetAccountResponse, CheckContractAccountResponse, GetContractInfoResponse, GetTxPoolSizeResponse, GetTransactionCacheResponse, GetTransactionHistoryResponse, SubmitTransactionResponse } from "../../../bop-sdk/proto/bop-sdk-interface";
|
|
2
|
+
import { GetTransactionHistoryResponse as GetTransactionHistoryBopResponse, GetLedgerResponse, HelloResponse, GetAccountBaseResponse, GetAccountResponse as GetAccountBopResponse, GetTxCacheSizeResponse, GetTransactionCacheChainResponse, SubmitTransactionResponse as SubmitTransactionBopResponse } from "../../../bop/bop-proto/bop";
|
|
3
|
+
export declare function ChainHelloToChainInfo(from: HelloResponse): GetChainInfoResponse;
|
|
4
|
+
export declare function ChainHelloToNetworkId(from: HelloResponse): GetNetworkIdResponse;
|
|
5
|
+
export declare function LedgerHeaderToHeader(from: GetLedgerResponse): LedgerResponse;
|
|
6
|
+
export declare function LedgerHeaderToLedgerNumber(from: GetLedgerResponse): LedgerNumberResponse;
|
|
7
|
+
export declare function LedgerHeaderToLedgerLeader(from: GetLedgerResponse): LedgerLeaderResponse;
|
|
8
|
+
export declare function LedgerHeaderToLedgerValidators(from: GetLedgerResponse): LedgerValidatorsResponse;
|
|
9
|
+
export declare function LedgerHeaderToLedgerTxHashes(from: GetTransactionHistoryBopResponse): LedgerTxHashesResponse;
|
|
10
|
+
export declare function AccountAccountResultToAccountInfo(from: GetAccountBaseResponse): GetAccountResponse;
|
|
11
|
+
export declare function AccountAccountToAccountMetadatas(from: GetAccountBopResponse): GetAccountMetadataResponse;
|
|
12
|
+
export declare function AccountAccountResultToIncreaseNonce(from: GetAccountBaseResponse): GetAccountIncreaseNonceResponse;
|
|
13
|
+
export declare function AccountAccountResultToBalance(from: GetAccountBaseResponse): GetAccountBalanceResponse;
|
|
14
|
+
export declare function AccountAccountResultToPriv(from: GetAccountBaseResponse): GetAccountPrivResponse;
|
|
15
|
+
export declare function ContractAccountResultToCheckContractAccount(from: GetAccountBaseResponse): CheckContractAccountResponse;
|
|
16
|
+
export declare function ContractAccountResultToGetContractInfo(from: GetAccountBaseResponse): GetContractInfoResponse;
|
|
17
|
+
export declare function TxTxCacheSizeToTxPoolSizeResponse(from: GetTxCacheSizeResponse): GetTxPoolSizeResponse;
|
|
18
|
+
export declare function TxTxCacheChainToTxCacheResponse(from: GetTransactionCacheChainResponse): GetTransactionCacheResponse;
|
|
19
|
+
export declare function TxTxHistoryToTxHistoryResponse(from: GetTransactionHistoryBopResponse): GetTransactionHistoryResponse;
|
|
20
|
+
export declare function TxSubmitTxToSubmitTransactionResponse(from: SubmitTransactionBopResponse): SubmitTransactionResponse;
|