@tatumio/algo 2.0.1-alpha.340 → 2.0.1-alpha.341
Sign up to get free protection for your applications and to get access to all the features.
- package/package.json +6 -6
- package/src/index.d.ts +5 -0
- package/src/index.js.map +1 -1
- package/src/lib/algo.sdk.d.ts +63 -50
- package/src/lib/algo.sdk.js +17 -8
- package/src/lib/algo.sdk.js.map +1 -1
- package/src/lib/services/algo.tx.d.ts +68 -29
- package/src/lib/services/algo.tx.js +270 -121
- package/src/lib/services/algo.tx.js.map +1 -1
- package/src/lib/services/algo.record.d.ts +0 -17
- package/src/lib/services/algo.record.js +0 -23
- package/src/lib/services/algo.record.js.map +0 -1
package/package.json
CHANGED
@@ -1,19 +1,19 @@
|
|
1
1
|
{
|
2
2
|
"name": "@tatumio/algo",
|
3
|
-
"version": "2.0.1-alpha.
|
3
|
+
"version": "2.0.1-alpha.341",
|
4
4
|
"type": "commonjs",
|
5
5
|
"license": "MIT",
|
6
6
|
"main": "./src/index.js",
|
7
7
|
"types": "./src/index.d.ts",
|
8
8
|
"dependencies": {
|
9
|
-
"@tatumio/shared-testing-common": "2.0.1-alpha.
|
10
|
-
"@tatumio/api-client": "2.0.1-alpha.
|
9
|
+
"@tatumio/shared-testing-common": "2.0.1-alpha.341",
|
10
|
+
"@tatumio/api-client": "2.0.1-alpha.341",
|
11
11
|
"axios": "^0.26.0",
|
12
12
|
"form-data": "^4.0.0",
|
13
|
-
"@tatumio/shared-core": "2.0.1-alpha.
|
14
|
-
"@tatumio/shared-abstract-sdk": "2.0.1-alpha.
|
13
|
+
"@tatumio/shared-core": "2.0.1-alpha.341",
|
14
|
+
"@tatumio/shared-abstract-sdk": "2.0.1-alpha.341",
|
15
15
|
"bignumber.js": "^9.0.2",
|
16
|
-
"@tatumio/shared-blockchain-abstract": "2.0.1-alpha.
|
16
|
+
"@tatumio/shared-blockchain-abstract": "2.0.1-alpha.341",
|
17
17
|
"algosdk": "^1.13.1",
|
18
18
|
"base32.js": "^0.1.0",
|
19
19
|
"url-parse": "^1.5.10",
|
package/src/index.d.ts
CHANGED
package/src/index.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../packages/blockchain/algo/src/index.ts"],"names":[],"mappings":";;;
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../packages/blockchain/algo/src/index.ts"],"names":[],"mappings":";;;AAIA,yDAA8B"}
|
package/src/lib/algo.sdk.d.ts
CHANGED
@@ -1,12 +1,8 @@
|
|
1
1
|
import { SDKArguments } from '@tatumio/shared-abstract-sdk';
|
2
2
|
import { AlgorandService, FungibleTokensErc20OrCompatibleService } from '@tatumio/api-client';
|
3
|
-
|
3
|
+
import { AlgoApiCallsType } from '../index';
|
4
|
+
export declare const TatumAlgoSDK: (args: SDKArguments, apiCalls?: AlgoApiCallsType) => {
|
4
5
|
algoWeb: import("./services/algo.web").AlgoWeb;
|
5
|
-
record: {
|
6
|
-
getLog(id: string): import("@tatumio/api-client").CancelablePromise<{
|
7
|
-
data: string;
|
8
|
-
}>;
|
9
|
-
};
|
10
6
|
wallet: {
|
11
7
|
generateWallet(mnemonic?: string): import("@tatumio/api-client").AlgoWallet;
|
12
8
|
generateAddressFromPrivatetKey(privateKey: string): string;
|
@@ -16,46 +12,80 @@ export declare const TatumAlgoSDK: (args: SDKArguments) => {
|
|
16
12
|
signedTransaction: (body: import("./services/algo.tx").TransferAlgo | import("./services/algo.tx").TransferAlgoKMS, testnet?: boolean, provider?: string) => Promise<string>;
|
17
13
|
};
|
18
14
|
send: {
|
19
|
-
signedTransaction: (body: import("./services/algo.tx").TransferAlgo | import("./services/algo.tx").TransferAlgoKMS, testnet?: boolean, provider?: string) => Promise<import("@tatumio/api-client").
|
15
|
+
signedTransaction: (body: import("./services/algo.tx").TransferAlgo | import("./services/algo.tx").TransferAlgoKMS, testnet?: boolean, provider?: string) => Promise<import("@tatumio/api-client").SignatureId | import("@tatumio/api-client").TransactionHash>;
|
20
16
|
};
|
21
17
|
};
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
18
|
+
token: {
|
19
|
+
asset: {
|
20
|
+
prepare: {
|
21
|
+
receive: (body: import("@tatumio/api-client").ReceiveAlgorandAsset | import("@tatumio/api-client").ReceiveAlgorandAssetKMS, testnet?: boolean, provider?: string) => Promise<string>;
|
22
|
+
};
|
23
|
+
send: {
|
24
|
+
receive: (body: import("@tatumio/api-client").ReceiveAlgorandAsset | import("@tatumio/api-client").ReceiveAlgorandAssetKMS, testnet?: boolean, provider?: string) => Promise<import("@tatumio/api-client").SignatureId | import("@tatumio/api-client").TransactionHash>;
|
25
|
+
};
|
30
26
|
};
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
27
|
+
receiveAsset: (body: import("@tatumio/api-client").ReceiveAlgorandAsset | import("@tatumio/api-client").ReceiveAlgorandAssetKMS, testnet?: boolean, provider?: string) => Promise<import("@tatumio/api-client").SignatureId | import("@tatumio/api-client").TransactionHash>;
|
28
|
+
fungible: {
|
29
|
+
getFTTransactionByAddress: typeof FungibleTokensErc20OrCompatibleService.erc20GetTransactionByAddress;
|
30
|
+
getFTAccountBalance: typeof FungibleTokensErc20OrCompatibleService.erc20GetBalance;
|
31
|
+
getFTAccountBalances: typeof FungibleTokensErc20OrCompatibleService.erc20GetBalanceAddress;
|
32
|
+
prepare: {
|
33
|
+
createFTSignedTransaction: (body: import("./services/algo.tx").DeployErc20KMS | import("./services/algo.tx").DeployErc20, testnet?: boolean, provider?: string) => Promise<string>;
|
34
|
+
transferFTSignedTransaction: (body: import("./services/algo.tx").ChainTransferAlgoErc20 | import("./services/algo.tx").ChainTransferAlgoErc20KMS, testnet?: boolean, provider?: string) => Promise<string>;
|
35
|
+
burnFTSignedTransaction: (body: import("./services/algo.tx").ChainTransferAlgoErc20 | import("./services/algo.tx").ChainTransferAlgoErc20KMS, testnet?: boolean, provider?: string) => Promise<string>;
|
36
|
+
};
|
37
|
+
send: {
|
38
|
+
createFTSignedTransaction: (body: import("./services/algo.tx").DeployErc20KMS | import("./services/algo.tx").DeployErc20, testnet?: boolean, provider?: string) => Promise<import("@tatumio/api-client").SignatureId | import("@tatumio/api-client").TransactionHash>;
|
39
|
+
transferFTSignedTransaction: (body: import("./services/algo.tx").ChainTransferAlgoErc20 | import("./services/algo.tx").ChainTransferAlgoErc20KMS, testnet?: boolean, provider?: string) => Promise<import("@tatumio/api-client").SignatureId | import("@tatumio/api-client").TransactionHash>;
|
40
|
+
burnFTSignedTransaction: (body: import("./services/algo.tx").ChainTransferAlgoErc20 | import("./services/algo.tx").ChainTransferAlgoErc20KMS, testnet?: boolean, provider?: string) => Promise<import("@tatumio/api-client").SignatureId | import("@tatumio/api-client").TransactionHash>;
|
41
|
+
};
|
35
42
|
};
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
43
|
+
nft: {
|
44
|
+
mintNFT: typeof import("@tatumio/api-client").NftErc721OrCompatibleService.nftMintErc721;
|
45
|
+
transferNFT: typeof import("@tatumio/api-client").NftErc721OrCompatibleService.nftTransferErc721;
|
46
|
+
burnNFT: typeof import("@tatumio/api-client").NftErc721OrCompatibleService.nftBurnErc721;
|
47
|
+
getNFTAccountBalance: typeof import("@tatumio/api-client").NftErc721OrCompatibleService.nftGetBalanceErc721;
|
48
|
+
getNFTContractAddress: typeof import("@tatumio/api-client").NftErc721OrCompatibleService.nftGetContractAddress;
|
49
|
+
prepare: {
|
50
|
+
createNFTSignedTransaction: (body: import("./services/algo.tx").MintNftAlgorandKMS | import("./services/algo.tx").MintNftAlgorand, testnet?: boolean, provider?: string) => Promise<string>;
|
51
|
+
transferNFTSignedTransaction: (body: import("./services/algo.tx").TransferNftKMS | import("./services/algo.tx").TransferNft, testnet?: boolean, provider?: string) => Promise<string>;
|
52
|
+
burnNFTSignedTransaction: (body: import("./services/algo.tx").BurnNftKMS | import("./services/algo.tx").BurnNft, testnet?: boolean, provider?: string) => Promise<string>;
|
53
|
+
};
|
54
|
+
send: {
|
55
|
+
createNFTSignedTransaction: (body: import("./services/algo.tx").MintNftAlgorandKMS | import("./services/algo.tx").MintNftAlgorand, testnet?: boolean, provider?: string) => Promise<import("@tatumio/api-client").SignatureId | import("@tatumio/api-client").TransactionHash | import("@tatumio/api-client").FlowMintedResult | import("@tatumio/api-client").SolanaMintedResult | import("@tatumio/api-client").AlgorandMintedResult>;
|
56
|
+
transferNFTSignedTransaction: (body: import("./services/algo.tx").TransferNftKMS | import("./services/algo.tx").TransferNft, testnet?: boolean, provider?: string) => Promise<import("@tatumio/api-client").SignatureId | import("@tatumio/api-client").TransactionHash>;
|
57
|
+
burnNFTSignedTransaction: (body: import("./services/algo.tx").BurnNftKMS | import("./services/algo.tx").BurnNft, testnet?: boolean, provider?: string) => Promise<import("@tatumio/api-client").SignatureId | import("@tatumio/api-client").TransactionHash>;
|
58
|
+
};
|
49
59
|
};
|
50
60
|
};
|
51
61
|
blockchain: {
|
52
|
-
broadcast: typeof AlgorandService.
|
62
|
+
broadcast: typeof AlgorandService.algorandBroadcast;
|
53
63
|
getBlock: typeof AlgorandService.algorandGetBlock;
|
54
64
|
getCurrentBlock: typeof AlgorandService.algorandGetCurrentBlock;
|
55
65
|
getBlockchainAccountBalance: typeof AlgorandService.algorandGetBalance;
|
56
66
|
getTransaction: typeof AlgorandService.algorandGetTransaction;
|
57
67
|
getPayTransactionByFromTo: typeof AlgorandService.algorandGetPayTransactionsByFromTo;
|
58
68
|
};
|
69
|
+
virtualAccount: {
|
70
|
+
send: (body: import("@tatumio/api-client").TransferAlgo | import("@tatumio/api-client").TransferAlgoKMS, testnet?: boolean, provider?: string) => Promise<void | import("@tatumio/api-client").OffchainTransactionResult | import("@tatumio/api-client").OffchainTransactionSignatureResult | {
|
71
|
+
id?: string;
|
72
|
+
}>;
|
73
|
+
depositAddress: {
|
74
|
+
checkExists: (address: string, index?: number) => Promise<any>;
|
75
|
+
create: any;
|
76
|
+
createMultiple: any;
|
77
|
+
assign: any;
|
78
|
+
remove: any;
|
79
|
+
getByAccount: any;
|
80
|
+
};
|
81
|
+
withdrawal: {
|
82
|
+
getAll: (status?: "InProgress" | "Done" | "Cancelled", pageSize?: number, offset?: number) => Promise<any[]>;
|
83
|
+
broadcast: any;
|
84
|
+
create: any;
|
85
|
+
complete: any;
|
86
|
+
};
|
87
|
+
storeTokenAddress: any;
|
88
|
+
};
|
59
89
|
node: {
|
60
90
|
indexerGetDriver: typeof AlgorandService.algoNodeIndexerGetDriver;
|
61
91
|
getDriver: typeof AlgorandService.algoNodeGetDriver;
|
@@ -67,23 +97,6 @@ export declare const TatumAlgoSDK: (args: SDKArguments) => {
|
|
67
97
|
complete: typeof import("@tatumio/api-client").KeyManagementSystemService.completePendingSignature;
|
68
98
|
delete: typeof import("@tatumio/api-client").KeyManagementSystemService.deletePendingTransactionToSign;
|
69
99
|
};
|
70
|
-
virtualAccount: {
|
71
|
-
depositAddress: {
|
72
|
-
checkExists: (address: string, index?: number) => Promise<import("@tatumio/api-client").Account>;
|
73
|
-
create: typeof import("@tatumio/api-client").BlockchainAddressesService.generateDepositAddress;
|
74
|
-
createMultiple: typeof import("@tatumio/api-client").BlockchainAddressesService.generateDepositAddressesBatch;
|
75
|
-
assign: typeof import("@tatumio/api-client").BlockchainAddressesService.assignAddress;
|
76
|
-
remove: typeof import("@tatumio/api-client").BlockchainAddressesService.removeAddress;
|
77
|
-
getByAccount: typeof import("@tatumio/api-client").BlockchainAddressesService.getAllDepositAddresses;
|
78
|
-
};
|
79
|
-
withdrawal: {
|
80
|
-
getAll: (status?: "InProgress" | "Done" | "Cancelled", pageSize?: number, offset?: number) => Promise<import("@tatumio/api-client").WithdrawalObject[]>;
|
81
|
-
broadcast: typeof import("@tatumio/api-client").WithdrawalService.broadcastBlockchainTransaction;
|
82
|
-
create: typeof import("@tatumio/api-client").WithdrawalService.storeWithdrawal;
|
83
|
-
complete: typeof import("@tatumio/api-client").WithdrawalService.completeWithdrawal;
|
84
|
-
};
|
85
|
-
storeTokenAddress: typeof import("@tatumio/api-client").BlockchainOperationsService.storeTokenAddress;
|
86
|
-
};
|
87
100
|
getExchangeRate(basePair?: import("@tatumio/api-client").Fiat): import("@tatumio/api-client").CancelablePromise<import("@tatumio/api-client").ExchangeRate>;
|
88
101
|
storage: {
|
89
102
|
upload: typeof import("@tatumio/api-client").IpfsService.storeIpfs;
|
package/src/lib/algo.sdk.js
CHANGED
@@ -6,24 +6,33 @@ const shared_core_1 = require("@tatumio/shared-core");
|
|
6
6
|
const shared_blockchain_abstract_1 = require("@tatumio/shared-blockchain-abstract");
|
7
7
|
const api_client_1 = require("@tatumio/api-client");
|
8
8
|
const algo_web_1 = require("./services/algo.web");
|
9
|
-
const algo_record_1 = require("./services/algo.record");
|
10
9
|
const algo_wallet_1 = require("./services/algo.wallet");
|
11
10
|
const algo_tx_1 = require("./services/algo.tx");
|
12
11
|
const blockchain = shared_core_1.Blockchain.ALGO;
|
13
|
-
const TatumAlgoSDK = (args
|
12
|
+
const TatumAlgoSDK = (args, apiCalls = {
|
13
|
+
getBlockchainAccountBalance: api_client_1.ApiServices.blockchain.algo.algorandGetBalance,
|
14
|
+
}) => {
|
14
15
|
const web = (0, algo_web_1.algoWeb)();
|
15
|
-
const txService = (0, algo_tx_1.
|
16
|
+
const txService = (0, algo_tx_1.algoTxService)({ algoWeb: web }, apiCalls);
|
16
17
|
const _a = (0, shared_blockchain_abstract_1.abstractBlockchainSdk)(Object.assign(Object.assign({}, args), { blockchain })), { nft } = _a, abstractSdk = tslib_1.__rest(_a, ["nft"]);
|
17
|
-
const { transferNFT, burnNFT } = nft;
|
18
|
-
return Object.assign(Object.assign({}, abstractSdk), { algoWeb: web,
|
19
|
-
|
20
|
-
|
18
|
+
const { mintNFT, transferNFT, burnNFT, getNFTAccountBalance, getNFTContractAddress } = nft;
|
19
|
+
return Object.assign(Object.assign({}, abstractSdk), { algoWeb: web, wallet: (0, algo_wallet_1.algoWallet)(), transaction: txService.native, token: {
|
20
|
+
asset: txService.asset,
|
21
|
+
receiveAsset: txService.asset.send.receive,
|
22
|
+
fungible: Object.assign(Object.assign({}, txService.fungible), { getFTTransactionByAddress: api_client_1.FungibleTokensErc20OrCompatibleService.erc20GetTransactionByAddress, getFTAccountBalance: api_client_1.FungibleTokensErc20OrCompatibleService.erc20GetBalance, getFTAccountBalances: api_client_1.FungibleTokensErc20OrCompatibleService.erc20GetBalanceAddress }),
|
23
|
+
nft: Object.assign(Object.assign({}, txService.nft), { mintNFT,
|
24
|
+
transferNFT,
|
25
|
+
burnNFT,
|
26
|
+
getNFTAccountBalance,
|
27
|
+
getNFTContractAddress }),
|
28
|
+
}, blockchain: {
|
29
|
+
broadcast: api_client_1.AlgorandService.algorandBroadcast,
|
21
30
|
getBlock: api_client_1.AlgorandService.algorandGetBlock,
|
22
31
|
getCurrentBlock: api_client_1.AlgorandService.algorandGetCurrentBlock,
|
23
32
|
getBlockchainAccountBalance: api_client_1.AlgorandService.algorandGetBalance,
|
24
33
|
getTransaction: api_client_1.AlgorandService.algorandGetTransaction,
|
25
34
|
getPayTransactionByFromTo: api_client_1.AlgorandService.algorandGetPayTransactionsByFromTo,
|
26
|
-
}, node: {
|
35
|
+
}, virtualAccount: Object.assign(Object.assign({}, (0, shared_blockchain_abstract_1.abstractBlockchainVirtualAccount)({ blockchain })), txService.virtualAccount), node: {
|
27
36
|
indexerGetDriver: api_client_1.AlgorandService.algoNodeIndexerGetDriver,
|
28
37
|
getDriver: api_client_1.AlgorandService.algoNodeGetDriver,
|
29
38
|
postDriver: api_client_1.AlgorandService.algoNodePostDriver,
|
package/src/lib/algo.sdk.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"algo.sdk.js","sourceRoot":"","sources":["../../../../../../packages/blockchain/algo/src/lib/algo.sdk.ts"],"names":[],"mappings":";;;;AAAA,sDAAiD;AAEjD,
|
1
|
+
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O;gBACP,oBAAoB;gBACpB,qBAAqB,GACtB;SACF,EACD,UAAU,EAAE;YACV,SAAS,EAAE,4BAAe,CAAC,iBAAiB;YAC5C,QAAQ,EAAE,4BAAe,CAAC,gBAAgB;YAC1C,eAAe,EAAE,4BAAe,CAAC,uBAAuB;YACxD,2BAA2B,EAAE,4BAAe,CAAC,kBAAkB;YAC/D,cAAc,EAAE,4BAAe,CAAC,sBAAsB;YACtD,yBAAyB,EAAE,4BAAe,CAAC,kCAAkC;SAC9E,EACD,cAAc,kCACT,IAAA,6DAAgC,EAAC,EAAE,UAAU,EAAE,CAAC,GAChD,SAAS,CAAC,cAAc,GAE7B,IAAI,EAAE;YACJ,gBAAgB,EAAE,4BAAe,CAAC,wBAAwB;YAC1D,SAAS,EAAE,4BAAe,CAAC,iBAAiB;YAC5C,UAAU,EAAE,4BAAe,CAAC,kBAAkB;SAC/C,IACF;AACH,CAAC,CAAA;AArDY,QAAA,YAAY,gBAqDxB"}
|
@@ -1,16 +1,17 @@
|
|
1
|
-
import { BurnNft as ApiBurnNft, BurnNftKMS as ApiBurnNftKMS, ChainTransferAlgoErc20 as ApiChainTransferAlgoErc20, ChainTransferAlgoErc20KMS as ApiChainTransferAlgoErc20KMS, DeployErc20 as ApiDeployErc20, DeployErc20KMS as ApiDeployErc20KMS,
|
1
|
+
import { BurnNft as ApiBurnNft, BurnNftKMS as ApiBurnNftKMS, ChainTransferAlgoErc20 as ApiChainTransferAlgoErc20, ChainTransferAlgoErc20KMS as ApiChainTransferAlgoErc20KMS, DeployErc20 as ApiDeployErc20, DeployErc20KMS as ApiDeployErc20KMS, MintNftAlgorand as ApiMintNftAlgorand, MintNftAlgorandKMS as ApiMintNftAlgorandKMS, OffchainTransactionResult, OffchainTransactionSignatureResult, ReceiveAlgorandAsset, ReceiveAlgorandAssetKMS, TransferAlgo as ApiTransferAlgo, TransferAlgoKMS as ApiTransferAlgoKMS, TransferNft as ApiTransferNft, TransferNftKMS as ApiTransferNftKMS } from '@tatumio/api-client';
|
2
2
|
import { AlgoWeb } from './algo.web';
|
3
3
|
import { WithoutChain } from '@tatumio/shared-abstract-sdk';
|
4
|
+
import { AlgoApiCallsType } from '../../index';
|
4
5
|
export declare type TransferAlgo = Omit<ApiTransferAlgo, 'senderAccountId'>;
|
5
6
|
export declare type TransferAlgoKMS = Omit<ApiTransferAlgoKMS, 'senderAccountId'> & {
|
6
7
|
from: string;
|
7
8
|
fee: string;
|
8
9
|
};
|
9
|
-
export declare type
|
10
|
+
export declare type MintNftAlgorandKMS = WithoutChain<ApiMintNftAlgorandKMS> & {
|
10
11
|
from: string;
|
11
12
|
url: string;
|
12
13
|
};
|
13
|
-
export declare type
|
14
|
+
export declare type MintNftAlgorand = WithoutChain<ApiMintNftAlgorand> & {
|
14
15
|
url: string;
|
15
16
|
};
|
16
17
|
export declare type TransferNftKMS = WithoutChain<ApiTransferNftKMS> & {
|
@@ -30,15 +31,41 @@ export declare type DeployErc20 = ApiDeployErc20 & {
|
|
30
31
|
};
|
31
32
|
export declare type ChainTransferAlgoErc20 = WithoutChain<ApiChainTransferAlgoErc20>;
|
32
33
|
export declare type ChainTransferAlgoErc20KMS = WithoutChain<ApiChainTransferAlgoErc20KMS>;
|
33
|
-
|
34
|
+
declare type SendOffchainResponse = OffchainTransactionResult | OffchainTransactionSignatureResult | {
|
35
|
+
id?: string;
|
36
|
+
} | void;
|
37
|
+
export declare const prepareSignedTransaction: (body: TransferAlgo | TransferAlgoKMS | ApiTransferAlgo | ApiTransferAlgoKMS, testnet: boolean, algoWeb: AlgoWeb, provider?: string) => Promise<string>;
|
38
|
+
export declare const algoTxService: (args: {
|
34
39
|
algoWeb: AlgoWeb;
|
35
|
-
}) => {
|
36
|
-
|
40
|
+
}, apiCalls: AlgoApiCallsType) => {
|
41
|
+
asset: {
|
37
42
|
prepare: {
|
38
43
|
/**
|
39
|
-
* Sign Algorand
|
44
|
+
* Sign Algorand receive asset transaction with private key locally. Nothing is broadcast to the blockchain.
|
45
|
+
* @param body content of the transaction to broadcast
|
40
46
|
* @param testnet mainnet or testnet version
|
47
|
+
* @param provider url of the Algorand Server to connect to. If not set, default public server will be used.
|
48
|
+
* @returns transaction data to be broadcast to blockchain
|
49
|
+
*/
|
50
|
+
receive: (body: ReceiveAlgorandAsset | ReceiveAlgorandAssetKMS, testnet?: boolean, provider?: string) => Promise<string>;
|
51
|
+
};
|
52
|
+
send: {
|
53
|
+
/**
|
54
|
+
* Send Algorand receive asset transaction with private key locally.
|
41
55
|
* @param body content of the transaction to broadcast
|
56
|
+
* @param testnet mainnet or testnet version
|
57
|
+
* @param provider url of the Algorand Server to connect to. If not set, default public server will be used.
|
58
|
+
* @returns transaction data to be broadcast to blockchain
|
59
|
+
*/
|
60
|
+
receive: (body: ReceiveAlgorandAsset | ReceiveAlgorandAssetKMS, testnet?: boolean, provider?: string) => Promise<import("@tatumio/api-client").SignatureId | import("@tatumio/api-client").TransactionHash>;
|
61
|
+
};
|
62
|
+
};
|
63
|
+
fungible: {
|
64
|
+
prepare: {
|
65
|
+
/**
|
66
|
+
* Sign Algorand create FT transaction with private key locally. Nothing is broadcast to the blockchain.
|
67
|
+
* @param body content of the transaction to broadcast
|
68
|
+
* @param testnet mainnet or testnet version
|
42
69
|
* @param provider url of the Algorand Server to connnect to. If not set, default public server will be used.
|
43
70
|
* @returns transaction data to be broadcast to blockchain.
|
44
71
|
*/
|
@@ -46,15 +73,15 @@ export declare const algoTx: (args: {
|
|
46
73
|
/**
|
47
74
|
* Sign Algorand transfer FT transaction with private kwy locally. Nothing is broadcast to the blockchain.
|
48
75
|
* @param testnet mainnet or testnet version
|
49
|
-
* @param
|
76
|
+
* @param body content of the transaction to broadcast
|
50
77
|
* @param provider url of the Algorand Server to connect to. If not set, default public server will be used.
|
51
78
|
* @returns transaction data to be broadcast to blockchain.
|
52
79
|
*/
|
53
80
|
transferFTSignedTransaction: (body: ChainTransferAlgoErc20 | ChainTransferAlgoErc20KMS, testnet?: boolean, provider?: string) => Promise<string>;
|
54
81
|
/**
|
55
82
|
* Sign ALgorand burn FT transaction with private key locally. Nothing is broadcast to the blockchain.
|
56
|
-
* @param testnet mainnet or testnet version
|
57
83
|
* @param body content of the transaction to broadcast
|
84
|
+
* @param testnet mainnet or testnet version
|
58
85
|
* @param provider url of the Algorand Server to connect to. If not set, default public server will be used.
|
59
86
|
* @returns transaction data to be broadcast to blockchain.
|
60
87
|
*/
|
@@ -63,52 +90,52 @@ export declare const algoTx: (args: {
|
|
63
90
|
send: {
|
64
91
|
/**
|
65
92
|
* Send Algorand create FT transaction to the blockchain. This method broadcasts signed transaction to the blockchain.
|
66
|
-
* @param testnet mainnet or testnet version
|
67
93
|
* @param body content of the transaction to broadcast
|
94
|
+
* @param testnet mainnet or testnet version
|
68
95
|
* @param provider url of the Algorand Server to connect to. If not set, default public server will be used.
|
69
96
|
* @returns transaction id of the transaction in the blockchain.
|
70
97
|
*/
|
71
|
-
createFTSignedTransaction: (body: DeployErc20 | DeployErc20KMS, testnet?: boolean, provider?: string) => Promise<import("@tatumio/api-client").
|
98
|
+
createFTSignedTransaction: (body: DeployErc20 | DeployErc20KMS, testnet?: boolean, provider?: string) => Promise<import("@tatumio/api-client").SignatureId | import("@tatumio/api-client").TransactionHash>;
|
72
99
|
/**
|
73
100
|
* Send Algorand transfer FT transaction to the blockchain. This method broadcasts signed transaction to the blockchain.
|
74
|
-
* @param testnet mainnet or testnet version
|
75
101
|
* @param body content of the transaction to broadcast
|
102
|
+
* @param testnet mainnet or testnet version
|
76
103
|
* @param provider url of the Algorand Server to connect to. If not set, default public server will be used.
|
77
104
|
* @returns transaction id of the transaction in the blockchain.
|
78
105
|
*/
|
79
|
-
transferFTSignedTransaction: (body: ChainTransferAlgoErc20 | ChainTransferAlgoErc20KMS, testnet?: boolean, provider?: string) => Promise<import("@tatumio/api-client").
|
106
|
+
transferFTSignedTransaction: (body: ChainTransferAlgoErc20 | ChainTransferAlgoErc20KMS, testnet?: boolean, provider?: string) => Promise<import("@tatumio/api-client").SignatureId | import("@tatumio/api-client").TransactionHash>;
|
80
107
|
/**
|
81
108
|
* Sned Algorand burn FT transaction to the blockchain. This method broadcasts signed transaction to the blockchain.
|
82
|
-
* @param testnet mainnet or testnet version
|
83
109
|
* @param body content of the transaction to broadcast
|
110
|
+
* @param testnet mainnet or testnet version
|
84
111
|
* @param provider url of the Algorand Server to connect to. If not set, default public server will be used.
|
85
112
|
* @returns transaction id of the transaction in the blockchain.
|
86
113
|
*/
|
87
|
-
burnFTSignedTransaction: (body: ChainTransferAlgoErc20 | ChainTransferAlgoErc20KMS, testnet?: boolean, provider?: string) => Promise<import("@tatumio/api-client").
|
114
|
+
burnFTSignedTransaction: (body: ChainTransferAlgoErc20 | ChainTransferAlgoErc20KMS, testnet?: boolean, provider?: string) => Promise<import("@tatumio/api-client").SignatureId | import("@tatumio/api-client").TransactionHash>;
|
88
115
|
};
|
89
116
|
};
|
90
|
-
|
117
|
+
nft: {
|
91
118
|
prepare: {
|
92
119
|
/**
|
93
120
|
* Sign Algorand create NFT transaction with private key locally. Nothing is broadcast to the blockchain.
|
94
|
-
* @param testnet mainnet or testnet version
|
95
121
|
* @param body content of the transaction to broadcast
|
122
|
+
* @param testnet mainnet or testnet version
|
96
123
|
* @param provider url of the Algorand Server to connect to. If not set, default public server will be used.
|
97
124
|
* @returns transaction data to be broadcast to blockchain
|
98
125
|
*/
|
99
|
-
createNFTSignedTransaction: (body:
|
126
|
+
createNFTSignedTransaction: (body: MintNftAlgorand | MintNftAlgorandKMS, testnet?: boolean, provider?: string) => Promise<string>;
|
100
127
|
/**
|
101
128
|
* Sign Algorand transfer NFT transaction with private key locally. Nothing is broadcast to the blockchain.
|
102
|
-
* @param testnet mainnet or testnet version
|
103
129
|
* @param body content of the transaction to broadcast
|
130
|
+
* @param testnet mainnet or testnet version
|
104
131
|
* @param provider url of the Algorand Server to connect to. If not set, default public server will be used.
|
105
132
|
* @returns transaction data to be broadcast to blockchain.
|
106
133
|
*/
|
107
134
|
transferNFTSignedTransaction: (body: TransferNft | TransferNftKMS, testnet?: boolean, provider?: string) => Promise<string>;
|
108
135
|
/**
|
109
136
|
* Sign Algorand burn NFT transaction with private key locally. Nothing is broadcast to the blockchain.
|
110
|
-
* @param testnet mainnet or testnet version
|
111
137
|
* @param body content of the transaction to broadcast
|
138
|
+
* @param testnet mainnet or testnet version
|
112
139
|
* @param provider url of the Algorand Server to connect to. If not set, default public server will be used.
|
113
140
|
* @returns transaction data to be broadcast to blockchain.
|
114
141
|
*/
|
@@ -117,36 +144,36 @@ export declare const algoTx: (args: {
|
|
117
144
|
send: {
|
118
145
|
/**
|
119
146
|
* Send Algorand create NFT transaction to the blockchain. This method broadcasts signed transaction to the blockchain.
|
120
|
-
* @param testnet mainnet or testnet version
|
121
147
|
* @param body content of the transaction to broadcast
|
148
|
+
* @param testnet mainnet or testnet version
|
122
149
|
* @param provider url of the Algorand Server to connect to. If not set, default public server will be used.
|
123
150
|
* @returns transaction id of the transaction in the blockchain
|
124
151
|
*/
|
125
|
-
createNFTSignedTransaction: (body:
|
152
|
+
createNFTSignedTransaction: (body: MintNftAlgorand | MintNftAlgorandKMS, testnet?: boolean, provider?: string) => Promise<import("@tatumio/api-client").SignatureId | import("@tatumio/api-client").TransactionHash | import("@tatumio/api-client").FlowMintedResult | import("@tatumio/api-client").SolanaMintedResult | import("@tatumio/api-client").AlgorandMintedResult>;
|
126
153
|
/**
|
127
154
|
* Send Algorand Transfer NFT transaction to the blockchain. This method broadcasts signed transaction to the blockchain.
|
128
|
-
* @param testnet mainnet or testnet version
|
129
155
|
* @param body content of the transaction to broadcast
|
156
|
+
* @param testnet mainnet or testnet version
|
130
157
|
* @param provider url of the Algorand Server to connect to. If not set, default public server will be used.
|
131
158
|
* @returns transaction id of the transaction in the blockchain.
|
132
159
|
*/
|
133
|
-
transferNFTSignedTransaction: (body: TransferNft | TransferNftKMS, testnet?: boolean, provider?: string) => Promise<import("@tatumio/api-client").
|
160
|
+
transferNFTSignedTransaction: (body: TransferNft | TransferNftKMS, testnet?: boolean, provider?: string) => Promise<import("@tatumio/api-client").SignatureId | import("@tatumio/api-client").TransactionHash>;
|
134
161
|
/**
|
135
162
|
* Send Algorand burn NFT transaction to the blockchain. This method broadcasts signed transaction to the blockchain.
|
136
|
-
* @param testnet mainnet or testnet version
|
137
163
|
* @param body content of the transaction to broadcast
|
164
|
+
* @param testnet mainnet or testnet version
|
138
165
|
* @param provider url of the Algorand Server to connect to. If not set, default public server will be used.
|
139
166
|
* @returns transaction id of the transaction in the blockchain.
|
140
167
|
*/
|
141
|
-
burnNFTSignedTransaction: (body: BurnNft | BurnNftKMS, testnet?: boolean, provider?: string) => Promise<import("@tatumio/api-client").
|
168
|
+
burnNFTSignedTransaction: (body: BurnNft | BurnNftKMS, testnet?: boolean, provider?: string) => Promise<import("@tatumio/api-client").SignatureId | import("@tatumio/api-client").TransactionHash>;
|
142
169
|
};
|
143
170
|
};
|
144
171
|
native: {
|
145
172
|
prepare: {
|
146
173
|
/**
|
147
174
|
* Algorand transaction signing
|
148
|
-
* @param testnet if the algorand node is testnet or not
|
149
175
|
* @param body content of the transaction to broadcast
|
176
|
+
* @param testnet if the algorand node is testnet or not
|
150
177
|
* @param provider url of the algorand server endpoint for purestake.io restapi
|
151
178
|
* @returns transaction data to be broadcast to blockchain
|
152
179
|
*/
|
@@ -156,12 +183,24 @@ export declare const algoTx: (args: {
|
|
156
183
|
/**
|
157
184
|
* Send Algorand transaction to the blockchain. This method broadcasts signed transaction to the blockchain.
|
158
185
|
* This operation is irreversible.
|
159
|
-
* @param testnet mainnet or testnet version
|
160
186
|
* @param body content of the transaction to broadcast
|
187
|
+
* @param testnet mainnet or testnet version
|
161
188
|
* @param provider url of the Algorand Server to connect to. If not set, default public server will be used.
|
162
189
|
* @returns transaction id of the transaction in the blockchain
|
163
190
|
*/
|
164
|
-
signedTransaction: (body: TransferAlgo | TransferAlgoKMS, testnet?: boolean, provider?: string) => Promise<import("@tatumio/api-client").
|
191
|
+
signedTransaction: (body: TransferAlgo | TransferAlgoKMS, testnet?: boolean, provider?: string) => Promise<import("@tatumio/api-client").SignatureId | import("@tatumio/api-client").TransactionHash>;
|
165
192
|
};
|
166
193
|
};
|
194
|
+
virtualAccount: {
|
195
|
+
/**
|
196
|
+
* Send ALGO transaction from Tatum Ledger account to the blockchain. This method broadcasts signed transaction to the blockchain.
|
197
|
+
* This operation is irreversible.
|
198
|
+
* @param body content of the transaction to broadcast
|
199
|
+
* @param testnet if the algorand node is testnet or not
|
200
|
+
* @param provider url of the algorand server endpoint for purestake.io restapi
|
201
|
+
* @returns transaction id of the transaction in the blockchain or id of the withdrawal, if it was not cancelled automatically
|
202
|
+
*/
|
203
|
+
send: (body: ApiTransferAlgo | ApiTransferAlgoKMS, testnet?: boolean, provider?: string) => Promise<SendOffchainResponse>;
|
204
|
+
};
|
167
205
|
};
|
206
|
+
export {};
|
@@ -1,6 +1,6 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.
|
3
|
+
exports.algoTxService = exports.prepareSignedTransaction = void 0;
|
4
4
|
const tslib_1 = require("tslib");
|
5
5
|
const api_client_1 = require("@tatumio/api-client");
|
6
6
|
const algosdk = tslib_1.__importStar(require("algosdk"));
|
@@ -9,9 +9,7 @@ const algosdk = tslib_1.__importStar(require("algosdk"));
|
|
9
9
|
const base32_js_1 = tslib_1.__importDefault(require("base32.js"));
|
10
10
|
const algo_wallet_1 = require("./algo.wallet");
|
11
11
|
const shared_abstract_sdk_1 = require("@tatumio/shared-abstract-sdk");
|
12
|
-
|
13
|
-
return input.signatureId !== undefined;
|
14
|
-
}
|
12
|
+
const bignumber_js_1 = require("bignumber.js");
|
15
13
|
const prepareSignedTransaction = (body, testnet = false, algoWeb, provider) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
|
16
14
|
var _a;
|
17
15
|
const algodClient = algoWeb.getClient(testnet, provider);
|
@@ -19,7 +17,7 @@ const prepareSignedTransaction = (body, testnet = false, algoWeb, provider) => t
|
|
19
17
|
const decoder = new base32_js_1.default.Decoder({ type: 'rfc4648' });
|
20
18
|
const enc = new TextEncoder();
|
21
19
|
const note = enc.encode((_a = body.senderNote) !== null && _a !== void 0 ? _a : '');
|
22
|
-
const bodyn = algosdk.makePaymentTxnWithSuggestedParams(body.account, body.address, Number(body.amount) * 1000000, undefined, note, Object.assign(Object.assign({}, params), { fee: Number(body.fee) * 1000000, flatFee: true }));
|
20
|
+
const bodyn = algosdk.makePaymentTxnWithSuggestedParams(body.account, body.address, Number(body.amount) * 1000000, undefined, note, Object.assign(Object.assign({}, params), { fee: Number(body.fee || '0.001') * 1000000, flatFee: true }));
|
23
21
|
if (isTransferAlgoKMS(body)) {
|
24
22
|
return JSON.stringify(bodyn);
|
25
23
|
}
|
@@ -27,104 +25,167 @@ const prepareSignedTransaction = (body, testnet = false, algoWeb, provider) => t
|
|
27
25
|
const signedTxn = bodyn.signTxn(secretKey);
|
28
26
|
return Buffer.from(signedTxn).toString('hex');
|
29
27
|
});
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
})
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
const
|
64
|
-
|
65
|
-
|
66
|
-
const
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
28
|
+
exports.prepareSignedTransaction = prepareSignedTransaction;
|
29
|
+
function isTransferAlgoKMS(input) {
|
30
|
+
return input.signatureId !== undefined;
|
31
|
+
}
|
32
|
+
const algoTxService = (args, apiCalls) => {
|
33
|
+
const prepareSignedTransaction = (body, testnet = false, algoWeb, provider) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
|
34
|
+
const { balance } = yield apiCalls.getBlockchainAccountBalance(body.account);
|
35
|
+
const requiredBalance = new bignumber_js_1.BigNumber(body.amount).plus(body.fee || 0.001);
|
36
|
+
const accountBalance = new bignumber_js_1.BigNumber(balance || 0);
|
37
|
+
if (accountBalance.isLessThan(requiredBalance)) {
|
38
|
+
throw new shared_abstract_sdk_1.SdkError({
|
39
|
+
code: shared_abstract_sdk_1.SdkErrorCode.INSUFFICIENT_FUNDS,
|
40
|
+
originalError: {
|
41
|
+
name: shared_abstract_sdk_1.SdkErrorCode.INSUFFICIENT_FUNDS,
|
42
|
+
message: `Insufficient funds to create transaction from sender account ${body.account} -> available balance is ${accountBalance.toString()}, required balance is ${requiredBalance.toString()}.`,
|
43
|
+
},
|
44
|
+
});
|
45
|
+
}
|
46
|
+
return yield prepareSignedTransaction(body, testnet, algoWeb, provider);
|
47
|
+
});
|
48
|
+
const prepareCreateNFTSignedTransaction = (body, testnet = false, algoWeb, provider) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
|
49
|
+
var _a, _b, _c, _d;
|
50
|
+
const algodClient = algoWeb.getClient(testnet, provider);
|
51
|
+
const params = yield algodClient.getTransactionParams().do();
|
52
|
+
const decoder = new base32_js_1.default.Decoder({ type: 'rfc4648' });
|
53
|
+
const from = (0, shared_abstract_sdk_1.isWithSignatureId)(body)
|
54
|
+
? body.from
|
55
|
+
: (0, algo_wallet_1.algoWallet)().generateAddressFromPrivatetKey(body.fromPrivateKey);
|
56
|
+
const txn = algosdk.makeAssetCreateTxnWithSuggestedParams(from, undefined, 1, 0, false, from, (_a = body.attr) === null || _a === void 0 ? void 0 : _a.reserve, (_b = body.attr) === null || _b === void 0 ? void 0 : _b.freeze, (_c = body.attr) === null || _c === void 0 ? void 0 : _c.clawback, (_d = body.attr) === null || _d === void 0 ? void 0 : _d.assetUnit, body.name, body.url, undefined, params);
|
57
|
+
if ((0, shared_abstract_sdk_1.isWithSignatureId)(body)) {
|
58
|
+
return JSON.stringify(txn);
|
59
|
+
}
|
60
|
+
const secretKey = new Uint8Array(decoder.write(body.fromPrivateKey).buf);
|
61
|
+
const signedTxn = txn.signTxn(secretKey);
|
62
|
+
return Buffer.from(signedTxn).toString('hex');
|
63
|
+
});
|
64
|
+
const prepareTransferNFTSignedTransaction = (body, testnet = false, algoWeb, provider) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
|
65
|
+
const algodClient = algoWeb.getClient(testnet, provider);
|
66
|
+
const params = yield algodClient.getTransactionParams().do();
|
67
|
+
const decoder = new base32_js_1.default.Decoder({ type: 'rfc4648' });
|
68
|
+
const from = (0, shared_abstract_sdk_1.isWithSignatureId)(body)
|
69
|
+
? body.from
|
70
|
+
: (0, algo_wallet_1.algoWallet)().generateAddressFromPrivatetKey(body.fromPrivateKey);
|
71
|
+
if (!body.value) {
|
72
|
+
throw new Error('No value specified');
|
73
|
+
}
|
74
|
+
const txn = algosdk.makeAssetTransferTxnWithSuggestedParams(from, body.to, undefined, undefined, Number.parseInt(body.value), undefined, Number(body.contractAddress), params, undefined);
|
75
|
+
if ((0, shared_abstract_sdk_1.isWithSignatureId)(body)) {
|
76
|
+
return JSON.stringify(txn);
|
77
|
+
}
|
78
|
+
const secretKey = new Uint8Array(decoder.write(body.fromPrivateKey).buf);
|
79
|
+
const signedTxn = txn.signTxn(secretKey);
|
80
|
+
return Buffer.from(signedTxn).toString('hex');
|
81
|
+
});
|
82
|
+
const prepareBurnNFTSignedTransaction = (body, testnet = false, algoWeb, provider) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
|
83
|
+
const algodClient = algoWeb.getClient(testnet, provider);
|
84
|
+
const params = yield algodClient.getTransactionParams().do();
|
85
|
+
const decoder = new base32_js_1.default.Decoder({ type: 'rfc4648' });
|
86
|
+
const txn = algosdk.makeAssetDestroyTxnWithSuggestedParams((0, shared_abstract_sdk_1.isWithSignatureId)(body) ? body.from : (0, algo_wallet_1.algoWallet)().generateAddressFromPrivatetKey(body.fromPrivateKey), undefined, Number(body.contractAddress), params, undefined);
|
87
|
+
if ((0, shared_abstract_sdk_1.isWithSignatureId)(body)) {
|
88
|
+
return JSON.stringify(txn);
|
89
|
+
}
|
90
|
+
const secretKey = new Uint8Array(decoder.write(body.fromPrivateKey).buf);
|
91
|
+
const signedTxn = txn.signTxn(secretKey);
|
92
|
+
return Buffer.from(signedTxn).toString('hex');
|
93
|
+
});
|
94
|
+
const prepareReceiveAssetSignedTransaction = (body, testnet = false, algoWeb, provider) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
|
95
|
+
const algodClient = algoWeb.getClient(testnet, provider);
|
96
|
+
const params = yield algodClient.getTransactionParams().do();
|
97
|
+
const decoder = new base32_js_1.default.Decoder({ type: 'rfc4648' });
|
98
|
+
const from = (0, shared_abstract_sdk_1.isWithSignatureId)(body)
|
99
|
+
? body.from
|
100
|
+
: (0, algo_wallet_1.algoWallet)().generateAddressFromPrivatetKey(body.fromPrivateKey);
|
101
|
+
const txn = algosdk.makeAssetTransferTxnWithSuggestedParams(from, from, undefined, undefined, 0, undefined, body.assetId, params);
|
102
|
+
if ((0, shared_abstract_sdk_1.isWithSignatureId)(body)) {
|
103
|
+
return JSON.stringify(txn);
|
104
|
+
}
|
105
|
+
const secretKey = new Uint8Array(decoder.write(body.fromPrivateKey).buf);
|
106
|
+
return Buffer.from(txn.signTxn(secretKey)).toString('hex');
|
107
|
+
});
|
108
|
+
const prepareCreateFTSignedTransaction = (body, testnet = false, algoWeb, provider) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
|
109
|
+
const algodClient = algoWeb.getClient(testnet, provider);
|
110
|
+
const params = yield algodClient.getTransactionParams().do();
|
111
|
+
const decoder = new base32_js_1.default.Decoder({ type: 'rfc4648' });
|
112
|
+
const from = (0, shared_abstract_sdk_1.isWithSignatureId)(body)
|
113
|
+
? body.from
|
114
|
+
: (0, algo_wallet_1.algoWallet)().generateAddressFromPrivatetKey(body.fromPrivateKey);
|
115
|
+
const txn = algosdk.makeAssetCreateTxnWithSuggestedParams(from, undefined, Number(body.supply), Number(body.digits), false, from, undefined, undefined, undefined, body.symbol, body.name, body.url, undefined, params);
|
116
|
+
if ((0, shared_abstract_sdk_1.isWithSignatureId)(body)) {
|
117
|
+
return JSON.stringify(txn);
|
118
|
+
}
|
119
|
+
const secretKey = new Uint8Array(decoder.write(body.fromPrivateKey).buf);
|
120
|
+
const signedTxn = txn.signTxn(secretKey);
|
121
|
+
return Buffer.from(signedTxn).toString('hex');
|
122
|
+
});
|
123
|
+
const prepareTransferFTSignedTransaction = (body, testnet = false, algoWeb, provider) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
|
124
|
+
const algodClient = algoWeb.getClient(testnet, provider);
|
125
|
+
const params = yield algodClient.getTransactionParams().do();
|
126
|
+
const decoder = new base32_js_1.default.Decoder({ type: 'rfc4648' });
|
127
|
+
const from = (0, shared_abstract_sdk_1.isWithSignatureId)(body)
|
128
|
+
? body.from
|
129
|
+
: (0, algo_wallet_1.algoWallet)().generateAddressFromPrivatetKey(body.fromPrivateKey);
|
130
|
+
const txn = algosdk.makeAssetTransferTxnWithSuggestedParams(from, body.to, undefined, undefined, Number.parseInt(body.amount), undefined, Number(body.contractAddress), params, undefined);
|
131
|
+
if ((0, shared_abstract_sdk_1.isWithSignatureId)(body)) {
|
132
|
+
return JSON.stringify(txn);
|
133
|
+
}
|
134
|
+
const secretKey = new Uint8Array(decoder.write(body.fromPrivateKey).buf);
|
135
|
+
const signedTxn = txn.signTxn(secretKey);
|
136
|
+
return Buffer.from(signedTxn).toString('hex');
|
137
|
+
});
|
138
|
+
const prepareBurnFTSignedTransaction = (body, testnet = false, algoWeb, provider) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
|
139
|
+
const algodClient = algoWeb.getClient(testnet, provider);
|
140
|
+
const params = yield algodClient.getTransactionParams().do();
|
141
|
+
const decoder = new base32_js_1.default.Decoder({ type: 'rfc4648' });
|
142
|
+
const from = (0, shared_abstract_sdk_1.isWithSignatureId)(body)
|
143
|
+
? body.from
|
144
|
+
: (0, algo_wallet_1.algoWallet)().generateAddressFromPrivatetKey(body.fromPrivateKey);
|
145
|
+
const txn = algosdk.makeAssetDestroyTxnWithSuggestedParams(from, undefined, Number(body.contractAddress), params, undefined);
|
146
|
+
if ((0, shared_abstract_sdk_1.isWithSignatureId)(body)) {
|
147
|
+
return JSON.stringify(txn);
|
148
|
+
}
|
149
|
+
const secretKey = new Uint8Array(decoder.write(body.fromPrivateKey).buf);
|
150
|
+
const signedTxn = txn.signTxn(secretKey);
|
151
|
+
return Buffer.from(signedTxn).toString('hex');
|
152
|
+
});
|
121
153
|
return {
|
122
|
-
|
154
|
+
asset: {
|
123
155
|
prepare: {
|
124
156
|
/**
|
125
|
-
* Sign Algorand
|
157
|
+
* Sign Algorand receive asset transaction with private key locally. Nothing is broadcast to the blockchain.
|
158
|
+
* @param body content of the transaction to broadcast
|
159
|
+
* @param testnet mainnet or testnet version
|
160
|
+
* @param provider url of the Algorand Server to connect to. If not set, default public server will be used.
|
161
|
+
* @returns transaction data to be broadcast to blockchain
|
162
|
+
*/
|
163
|
+
receive: (body, testnet = false, provider) => tslib_1.__awaiter(void 0, void 0, void 0, function* () { return prepareReceiveAssetSignedTransaction(body, testnet, args.algoWeb, provider); }),
|
164
|
+
},
|
165
|
+
send: {
|
166
|
+
/**
|
167
|
+
* Send Algorand receive asset transaction with private key locally.
|
168
|
+
* @param body content of the transaction to broadcast
|
126
169
|
* @param testnet mainnet or testnet version
|
170
|
+
* @param provider url of the Algorand Server to connect to. If not set, default public server will be used.
|
171
|
+
* @returns transaction data to be broadcast to blockchain
|
172
|
+
*/
|
173
|
+
receive: (body, testnet = false, provider) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
|
174
|
+
if ((0, shared_abstract_sdk_1.isWithSignatureId)(body)) {
|
175
|
+
return api_client_1.ApiServices.blockchain.algo.algorandBlockchainReceiveAsset(body);
|
176
|
+
}
|
177
|
+
return api_client_1.AlgorandService.algorandBroadcast({
|
178
|
+
txData: yield prepareReceiveAssetSignedTransaction(body, testnet, args.algoWeb, provider),
|
179
|
+
});
|
180
|
+
}),
|
181
|
+
},
|
182
|
+
},
|
183
|
+
fungible: {
|
184
|
+
prepare: {
|
185
|
+
/**
|
186
|
+
* Sign Algorand create FT transaction with private key locally. Nothing is broadcast to the blockchain.
|
127
187
|
* @param body content of the transaction to broadcast
|
188
|
+
* @param testnet mainnet or testnet version
|
128
189
|
* @param provider url of the Algorand Server to connnect to. If not set, default public server will be used.
|
129
190
|
* @returns transaction data to be broadcast to blockchain.
|
130
191
|
*/
|
@@ -132,15 +193,15 @@ const algoTx = (args) => {
|
|
132
193
|
/**
|
133
194
|
* Sign Algorand transfer FT transaction with private kwy locally. Nothing is broadcast to the blockchain.
|
134
195
|
* @param testnet mainnet or testnet version
|
135
|
-
* @param
|
196
|
+
* @param body content of the transaction to broadcast
|
136
197
|
* @param provider url of the Algorand Server to connect to. If not set, default public server will be used.
|
137
198
|
* @returns transaction data to be broadcast to blockchain.
|
138
199
|
*/
|
139
200
|
transferFTSignedTransaction: (body, testnet = false, provider) => tslib_1.__awaiter(void 0, void 0, void 0, function* () { return prepareTransferFTSignedTransaction(body, testnet, args.algoWeb, provider); }),
|
140
201
|
/**
|
141
202
|
* Sign ALgorand burn FT transaction with private key locally. Nothing is broadcast to the blockchain.
|
142
|
-
* @param testnet mainnet or testnet version
|
143
203
|
* @param body content of the transaction to broadcast
|
204
|
+
* @param testnet mainnet or testnet version
|
144
205
|
* @param provider url of the Algorand Server to connect to. If not set, default public server will be used.
|
145
206
|
* @returns transaction data to be broadcast to blockchain.
|
146
207
|
*/
|
@@ -149,60 +210,76 @@ const algoTx = (args) => {
|
|
149
210
|
send: {
|
150
211
|
/**
|
151
212
|
* Send Algorand create FT transaction to the blockchain. This method broadcasts signed transaction to the blockchain.
|
152
|
-
* @param testnet mainnet or testnet version
|
153
213
|
* @param body content of the transaction to broadcast
|
214
|
+
* @param testnet mainnet or testnet version
|
154
215
|
* @param provider url of the Algorand Server to connect to. If not set, default public server will be used.
|
155
216
|
* @returns transaction id of the transaction in the blockchain.
|
156
217
|
*/
|
157
218
|
createFTSignedTransaction: (body, testnet = false, provider) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
|
158
|
-
|
219
|
+
if ((0, shared_abstract_sdk_1.isWithSignatureId)(body)) {
|
220
|
+
return api_client_1.ApiServices.fungibleToken.erc20Deploy(body);
|
221
|
+
}
|
222
|
+
const txData = yield prepareCreateFTSignedTransaction(body, testnet, args.algoWeb, provider);
|
223
|
+
return api_client_1.AlgorandService.algorandBroadcast({
|
224
|
+
txData,
|
225
|
+
});
|
159
226
|
}),
|
160
227
|
/**
|
161
228
|
* Send Algorand transfer FT transaction to the blockchain. This method broadcasts signed transaction to the blockchain.
|
162
|
-
* @param testnet mainnet or testnet version
|
163
229
|
* @param body content of the transaction to broadcast
|
230
|
+
* @param testnet mainnet or testnet version
|
164
231
|
* @param provider url of the Algorand Server to connect to. If not set, default public server will be used.
|
165
232
|
* @returns transaction id of the transaction in the blockchain.
|
166
233
|
*/
|
167
234
|
transferFTSignedTransaction: (body, testnet = false, provider) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
|
168
|
-
|
169
|
-
|
235
|
+
if ((0, shared_abstract_sdk_1.isWithSignatureId)(body)) {
|
236
|
+
return api_client_1.ApiServices.fungibleToken.erc20Transfer(body);
|
237
|
+
}
|
238
|
+
const txData = yield prepareTransferFTSignedTransaction(body, testnet, args.algoWeb, provider);
|
239
|
+
return api_client_1.AlgorandService.algorandBroadcast({
|
240
|
+
txData,
|
170
241
|
});
|
171
242
|
}),
|
172
243
|
/**
|
173
244
|
* Sned Algorand burn FT transaction to the blockchain. This method broadcasts signed transaction to the blockchain.
|
174
|
-
* @param testnet mainnet or testnet version
|
175
245
|
* @param body content of the transaction to broadcast
|
246
|
+
* @param testnet mainnet or testnet version
|
176
247
|
* @param provider url of the Algorand Server to connect to. If not set, default public server will be used.
|
177
248
|
* @returns transaction id of the transaction in the blockchain.
|
178
249
|
*/
|
179
250
|
burnFTSignedTransaction: (body, testnet = false, provider) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
|
180
|
-
|
251
|
+
if ((0, shared_abstract_sdk_1.isWithSignatureId)(body)) {
|
252
|
+
return api_client_1.ApiServices.fungibleToken.erc20Burn(body);
|
253
|
+
}
|
254
|
+
const txData = yield prepareBurnFTSignedTransaction(body, testnet, args.algoWeb, provider);
|
255
|
+
return api_client_1.AlgorandService.algorandBroadcast({
|
256
|
+
txData,
|
257
|
+
});
|
181
258
|
}),
|
182
259
|
},
|
183
260
|
},
|
184
|
-
|
261
|
+
nft: {
|
185
262
|
prepare: {
|
186
263
|
/**
|
187
264
|
* Sign Algorand create NFT transaction with private key locally. Nothing is broadcast to the blockchain.
|
188
|
-
* @param testnet mainnet or testnet version
|
189
265
|
* @param body content of the transaction to broadcast
|
266
|
+
* @param testnet mainnet or testnet version
|
190
267
|
* @param provider url of the Algorand Server to connect to. If not set, default public server will be used.
|
191
268
|
* @returns transaction data to be broadcast to blockchain
|
192
269
|
*/
|
193
270
|
createNFTSignedTransaction: (body, testnet = false, provider) => tslib_1.__awaiter(void 0, void 0, void 0, function* () { return prepareCreateNFTSignedTransaction(body, testnet, args.algoWeb, provider); }),
|
194
271
|
/**
|
195
272
|
* Sign Algorand transfer NFT transaction with private key locally. Nothing is broadcast to the blockchain.
|
196
|
-
* @param testnet mainnet or testnet version
|
197
273
|
* @param body content of the transaction to broadcast
|
274
|
+
* @param testnet mainnet or testnet version
|
198
275
|
* @param provider url of the Algorand Server to connect to. If not set, default public server will be used.
|
199
276
|
* @returns transaction data to be broadcast to blockchain.
|
200
277
|
*/
|
201
278
|
transferNFTSignedTransaction: (body, testnet = false, provider) => tslib_1.__awaiter(void 0, void 0, void 0, function* () { return prepareTransferNFTSignedTransaction(body, testnet, args.algoWeb, provider); }),
|
202
279
|
/**
|
203
280
|
* Sign Algorand burn NFT transaction with private key locally. Nothing is broadcast to the blockchain.
|
204
|
-
* @param testnet mainnet or testnet version
|
205
281
|
* @param body content of the transaction to broadcast
|
282
|
+
* @param testnet mainnet or testnet version
|
206
283
|
* @param provider url of the Algorand Server to connect to. If not set, default public server will be used.
|
207
284
|
* @returns transaction data to be broadcast to blockchain.
|
208
285
|
*/
|
@@ -211,33 +288,51 @@ const algoTx = (args) => {
|
|
211
288
|
send: {
|
212
289
|
/**
|
213
290
|
* Send Algorand create NFT transaction to the blockchain. This method broadcasts signed transaction to the blockchain.
|
214
|
-
* @param testnet mainnet or testnet version
|
215
291
|
* @param body content of the transaction to broadcast
|
292
|
+
* @param testnet mainnet or testnet version
|
216
293
|
* @param provider url of the Algorand Server to connect to. If not set, default public server will be used.
|
217
294
|
* @returns transaction id of the transaction in the blockchain
|
218
295
|
*/
|
219
296
|
createNFTSignedTransaction: (body, testnet = false, provider) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
|
220
|
-
|
297
|
+
if ((0, shared_abstract_sdk_1.isWithSignatureId)(body)) {
|
298
|
+
return api_client_1.ApiServices.nft.nftMintErc721(body);
|
299
|
+
}
|
300
|
+
const txData = yield prepareCreateNFTSignedTransaction(body, testnet, args.algoWeb, provider);
|
301
|
+
return api_client_1.AlgorandService.algorandBroadcast({
|
302
|
+
txData,
|
303
|
+
});
|
221
304
|
}),
|
222
305
|
/**
|
223
306
|
* Send Algorand Transfer NFT transaction to the blockchain. This method broadcasts signed transaction to the blockchain.
|
224
|
-
* @param testnet mainnet or testnet version
|
225
307
|
* @param body content of the transaction to broadcast
|
308
|
+
* @param testnet mainnet or testnet version
|
226
309
|
* @param provider url of the Algorand Server to connect to. If not set, default public server will be used.
|
227
310
|
* @returns transaction id of the transaction in the blockchain.
|
228
311
|
*/
|
229
312
|
transferNFTSignedTransaction: (body, testnet = false, provider) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
|
230
|
-
|
313
|
+
if ((0, shared_abstract_sdk_1.isWithSignatureId)(body)) {
|
314
|
+
return api_client_1.ApiServices.nft.nftTransferErc721(body);
|
315
|
+
}
|
316
|
+
const txData = yield prepareTransferNFTSignedTransaction(body, testnet, args.algoWeb, provider);
|
317
|
+
return api_client_1.AlgorandService.algorandBroadcast({
|
318
|
+
txData,
|
319
|
+
});
|
231
320
|
}),
|
232
321
|
/**
|
233
322
|
* Send Algorand burn NFT transaction to the blockchain. This method broadcasts signed transaction to the blockchain.
|
234
|
-
* @param testnet mainnet or testnet version
|
235
323
|
* @param body content of the transaction to broadcast
|
324
|
+
* @param testnet mainnet or testnet version
|
236
325
|
* @param provider url of the Algorand Server to connect to. If not set, default public server will be used.
|
237
326
|
* @returns transaction id of the transaction in the blockchain.
|
238
327
|
*/
|
239
328
|
burnNFTSignedTransaction: (body, testnet = false, provider) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
|
240
|
-
|
329
|
+
if ((0, shared_abstract_sdk_1.isWithSignatureId)(body)) {
|
330
|
+
return api_client_1.ApiServices.nft.nftBurnErc721(body);
|
331
|
+
}
|
332
|
+
const txData = yield prepareBurnNFTSignedTransaction(body, testnet, args.algoWeb, provider);
|
333
|
+
return api_client_1.AlgorandService.algorandBroadcast({
|
334
|
+
txData,
|
335
|
+
});
|
241
336
|
}),
|
242
337
|
},
|
243
338
|
},
|
@@ -245,8 +340,8 @@ const algoTx = (args) => {
|
|
245
340
|
prepare: {
|
246
341
|
/**
|
247
342
|
* Algorand transaction signing
|
248
|
-
* @param testnet if the algorand node is testnet or not
|
249
343
|
* @param body content of the transaction to broadcast
|
344
|
+
* @param testnet if the algorand node is testnet or not
|
250
345
|
* @param provider url of the algorand server endpoint for purestake.io restapi
|
251
346
|
* @returns transaction data to be broadcast to blockchain
|
252
347
|
*/
|
@@ -256,17 +351,71 @@ const algoTx = (args) => {
|
|
256
351
|
/**
|
257
352
|
* Send Algorand transaction to the blockchain. This method broadcasts signed transaction to the blockchain.
|
258
353
|
* This operation is irreversible.
|
259
|
-
* @param testnet mainnet or testnet version
|
260
354
|
* @param body content of the transaction to broadcast
|
355
|
+
* @param testnet mainnet or testnet version
|
261
356
|
* @param provider url of the Algorand Server to connect to. If not set, default public server will be used.
|
262
357
|
* @returns transaction id of the transaction in the blockchain
|
263
358
|
*/
|
264
359
|
signedTransaction: (body, testnet = false, provider) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
|
265
|
-
|
360
|
+
if ((0, shared_abstract_sdk_1.isWithSignatureId)(body)) {
|
361
|
+
return api_client_1.ApiServices.blockchain.algo.algorandBlockchainTransfer(body);
|
362
|
+
}
|
363
|
+
const txData = yield prepareSignedTransaction(body, testnet, args.algoWeb, provider);
|
364
|
+
return api_client_1.AlgorandService.algorandBroadcast({
|
365
|
+
txData,
|
366
|
+
});
|
266
367
|
}),
|
267
368
|
},
|
268
369
|
},
|
370
|
+
virtualAccount: {
|
371
|
+
/**
|
372
|
+
* Send ALGO transaction from Tatum Ledger account to the blockchain. This method broadcasts signed transaction to the blockchain.
|
373
|
+
* This operation is irreversible.
|
374
|
+
* @param body content of the transaction to broadcast
|
375
|
+
* @param testnet if the algorand node is testnet or not
|
376
|
+
* @param provider url of the algorand server endpoint for purestake.io restapi
|
377
|
+
* @returns transaction id of the transaction in the blockchain or id of the withdrawal, if it was not cancelled automatically
|
378
|
+
*/
|
379
|
+
send: (body, testnet = false, provider) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
|
380
|
+
if ('signatureId' in body) {
|
381
|
+
return api_client_1.ApiServices.offChain.blockchain.algoTransfer(body);
|
382
|
+
}
|
383
|
+
const _e = body, { fee, privateKey } = _e, withdrawal = tslib_1.__rest(_e, ["fee", "privateKey"]);
|
384
|
+
const { senderAccountId } = withdrawal;
|
385
|
+
const account = yield api_client_1.AccountService.getAccountByAccountId(senderAccountId);
|
386
|
+
let txData;
|
387
|
+
if (account.currency === api_client_1.Currency.ALGO) {
|
388
|
+
txData = yield prepareSignedTransaction(body, testnet, args.algoWeb, provider);
|
389
|
+
}
|
390
|
+
else {
|
391
|
+
const vc = yield api_client_1.ApiServices.ledger.virtualCurrency.getCurrency(account.currency);
|
392
|
+
txData = yield prepareTransferFTSignedTransaction({
|
393
|
+
from: (0, algo_wallet_1.algoWallet)().generateAddressFromPrivatetKey(privateKey),
|
394
|
+
fromPrivateKey: privateKey,
|
395
|
+
to: body.address,
|
396
|
+
amount: new bignumber_js_1.BigNumber(body.amount).multipliedBy(Math.pow(10, (vc.precision || 0))).toString(),
|
397
|
+
contractAddress: vc.erc20Address,
|
398
|
+
}, testnet, args.algoWeb, provider);
|
399
|
+
}
|
400
|
+
const { id } = yield api_client_1.ApiServices.offChain.withdrawal.storeWithdrawal(Object.assign(Object.assign({}, withdrawal), { fee: new bignumber_js_1.BigNumber(fee || '0.001').toString() }));
|
401
|
+
try {
|
402
|
+
return Object.assign(Object.assign({}, (yield api_client_1.ApiServices.offChain.withdrawal.broadcastBlockchainTransaction({
|
403
|
+
txData,
|
404
|
+
withdrawalId: id,
|
405
|
+
currency: api_client_1.Currency.ALGO,
|
406
|
+
}))), { id });
|
407
|
+
}
|
408
|
+
catch (_) {
|
409
|
+
try {
|
410
|
+
return yield api_client_1.ApiServices.offChain.withdrawal.cancelInProgressWithdrawal(id);
|
411
|
+
}
|
412
|
+
catch (_) {
|
413
|
+
return { id, completed: false };
|
414
|
+
}
|
415
|
+
}
|
416
|
+
}),
|
417
|
+
},
|
269
418
|
};
|
270
419
|
};
|
271
|
-
exports.
|
420
|
+
exports.algoTxService = algoTxService;
|
272
421
|
//# sourceMappingURL=algo.tx.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"algo.tx.js","sourceRoot":"","sources":["../../../../../../../packages/blockchain/algo/src/lib/services/algo.tx.ts"],"names":[],"mappings":";;;;AAAA,oDAe4B;AAE5B,yDAAkC;AAClC,yBAAyB;AACzB,aAAa;AACb,kEAA8B;AAC9B,+CAA0C;AAC1C,sEAA8E;AAE9E,SAAS,iBAAiB,CAAC,KAAqC;IAC9D,OAAQ,KAAyB,CAAC,WAAW,KAAK,SAAS,CAAA;AAC7D,CAAC;AAMD,MAAM,wBAAwB,GAAG,CAC/B,IAAoC,EACpC,OAAO,GAAG,KAAK,EACf,OAAgB,EAChB,QAAiB,EACjB,EAAE;;IACF,MAAM,WAAW,GAAG,OAAO,CAAC,SAAS,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAA;IACxD,MAAM,MAAM,GAAG,MAAM,WAAW,CAAC,oBAAoB,EAAE,CAAC,EAAE,EAAE,CAAA;IAE5D,MAAM,OAAO,GAAG,IAAI,mBAAM,CAAC,OAAO,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC,CAAA;IACvD,MAAM,GAAG,GAAG,IAAI,WAAW,EAAE,CAAA;IAC7B,MAAM,IAAI,GAAG,GAAG,CAAC,MAAM,CAAC,MAAA,IAAI,CAAC,UAAU,mCAAI,EAAE,CAAC,CAAA;IAC9C,MAAM,KAAK,GAAG,OAAO,CAAC,iCAAiC,CACrD,IAAI,CAAC,OAAO,EACZ,IAAI,CAAC,OAAO,EACZ,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,GAAG,OAAO,EAC7B,SAAS,EACT,IAAI,kCAEC,MAAM,KACT,GAAG,EAAE,MAAM,CAAC,IAAI,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;oBAAC,OAAO,CAAC,EAAE;wBACV,OAAO,EAAE,EAAE,EAAE,SAAS,EAAE,KAAK,EAAE,CAAA;qBAChC;iBACF;YACH,CAAC,CAAA;SACF;KACF,CAAA;AACH,CAAC,CAAA;AAvmBY,QAAA,aAAa,iBAumBzB"}
|
@@ -1,17 +0,0 @@
|
|
1
|
-
import { CancelablePromise } from '@tatumio/api-client';
|
2
|
-
export declare const algoRecord: () => {
|
3
|
-
/**
|
4
|
-
* Get log record
|
5
|
-
* <h4>1 credit per API call.</h4><br/><p>Gets log data from blockchain.</p>
|
6
|
-
* @param chain The blockchain to get the log record from
|
7
|
-
* @param id ID of the log record / transaction on the blockchain
|
8
|
-
* @returns any OK
|
9
|
-
* @throws ApiError
|
10
|
-
*/
|
11
|
-
getLog(id: string): CancelablePromise<{
|
12
|
-
/**
|
13
|
-
* Data stored in the record.
|
14
|
-
*/
|
15
|
-
data: string;
|
16
|
-
}>;
|
17
|
-
};
|
@@ -1,23 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.algoRecord = void 0;
|
4
|
-
const api_client_1 = require("@tatumio/api-client");
|
5
|
-
const shared_core_1 = require("@tatumio/shared-core");
|
6
|
-
const algoRecord = () => {
|
7
|
-
return {
|
8
|
-
/**
|
9
|
-
* Get log record
|
10
|
-
* <h4>1 credit per API call.</h4><br/><p>Gets log data from blockchain.</p>
|
11
|
-
* @param chain The blockchain to get the log record from
|
12
|
-
* @param id ID of the log record / transaction on the blockchain
|
13
|
-
* @returns any OK
|
14
|
-
* @throws ApiError
|
15
|
-
*/
|
16
|
-
getLog(id) {
|
17
|
-
// TODO: Open API bug
|
18
|
-
return api_client_1.BlockchainStorageService.getLog(shared_core_1.Blockchain.ALGO, id);
|
19
|
-
},
|
20
|
-
};
|
21
|
-
};
|
22
|
-
exports.algoRecord = algoRecord;
|
23
|
-
//# sourceMappingURL=algo.record.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"algo.record.js","sourceRoot":"","sources":["../../../../../../../packages/blockchain/algo/src/lib/services/algo.record.ts"],"names":[],"mappings":";;;AAAA,oDAAiF;AACjF,sDAAiD;AAE1C,MAAM,UAAU,GAAG,GAAG,EAAE;IAC7B,OAAO;QACL;;;;;;;WAOG;QACH,MAAM,CAAC,EAAU;YAMf,qBAAqB;YACrB,OAAO,qCAAwB,CAAC,MAAM,CAAC,wBAAU,CAAC,IAAW,EAAE,EAAE,CAAC,CAAA;QACpE,CAAC;KACF,CAAA;AACH,CAAC,CAAA;AApBY,QAAA,UAAU,cAoBtB"}
|