@tatumio/algo 2.0.1-alpha.235 → 2.0.1-alpha.238

Sign up to get free protection for your applications and to get access to all the features.
package/package.json CHANGED
@@ -1,22 +1,22 @@
1
1
  {
2
2
  "name": "@tatumio/algo",
3
- "version": "2.0.1-alpha.235",
3
+ "version": "2.0.1-alpha.238",
4
4
  "type": "commonjs",
5
5
  "license": "MIT",
6
6
  "main": "./src/index.js",
7
7
  "typings": "./src/index.d.ts",
8
8
  "dependencies": {
9
- "@tatumio/shared-testing-common": "2.0.1-alpha.235",
10
- "@tatumio/shared-blockchain-abstract": "2.0.1-alpha.235",
11
- "@tatumio/api-client": "2.0.1-alpha.235",
12
- "axios": "^0.24.0",
9
+ "@tatumio/shared-testing-common": "2.0.1-alpha.238",
10
+ "@tatumio/api-client": "2.0.1-alpha.238",
11
+ "axios": "^0.26.0",
13
12
  "form-data": "^4.0.0",
14
- "@tatumio/shared-core": "2.0.1-alpha.235",
15
- "@tatumio/shared-abstract-sdk": "2.0.1-alpha.235",
13
+ "@tatumio/shared-core": "2.0.1-alpha.238",
14
+ "@tatumio/shared-abstract-sdk": "2.0.1-alpha.238",
16
15
  "bignumber.js": "^9.0.2",
16
+ "@tatumio/shared-blockchain-abstract": "2.0.1-alpha.238",
17
17
  "algosdk": "^1.13.1",
18
18
  "base32.js": "^0.1.0",
19
- "url-parse": "^1.5.4"
19
+ "url-parse": "^1.5.9"
20
20
  },
21
21
  "peerDependencies": {}
22
22
  }
@@ -1,5 +1,5 @@
1
1
  import { SDKArguments } from '@tatumio/shared-abstract-sdk';
2
- import { BlockchainAlgorandAlgoService } from '@tatumio/api-client';
2
+ import { BlockchainAlgorandAlgoService, BlockchainFungibleTokenService } from '@tatumio/api-client';
3
3
  export declare const TatumAlgoSDK: (args: SDKArguments) => {
4
4
  algoWeb: import("./services/algo.web").AlgoWeb;
5
5
  record: {
@@ -20,6 +20,8 @@ export declare const TatumAlgoSDK: (args: SDKArguments) => {
20
20
  };
21
21
  };
22
22
  erc20: {
23
+ getErc20TransactionByAddress: typeof BlockchainFungibleTokenService.erc20GetTransactionByAddress;
24
+ getErc20AccountBalance: typeof BlockchainFungibleTokenService.erc20GetBalance;
23
25
  prepare: {
24
26
  createFTSignedTransaction: (body: import("./services/algo.tx").DeployErc20KMS | import("./services/algo.tx").DeployErc20, testnet?: boolean, provider?: string) => Promise<string>;
25
27
  transferFTSignedTransaction: (body: import("./services/algo.tx").ChainTransferAlgoErc20 | import("./services/algo.tx").ChainTransferAlgoErc20KMS, testnet?: boolean, provider?: string) => Promise<string>;
@@ -31,7 +33,9 @@ export declare const TatumAlgoSDK: (args: SDKArguments) => {
31
33
  burnFTSignedTransaction: (body: import("./services/algo.tx").ChainTransferAlgoErc20 | import("./services/algo.tx").ChainTransferAlgoErc20KMS, testnet?: boolean, provider?: string) => Promise<import("@tatumio/api-client").TransactionHashKMS>;
32
34
  };
33
35
  };
34
- erc721: {
36
+ nft: {
37
+ transferNFT: typeof import("@tatumio/api-client").BlockchainNftService.nftTransferErc721;
38
+ burnNFT: typeof import("@tatumio/api-client").BlockchainNftService.nftBurnErc721;
35
39
  prepare: {
36
40
  createNFTSignedTransaction: (body: import("./services/algo.tx").DeployNftKMS | import("./services/algo.tx").DeployNft, testnet?: boolean, provider?: string) => Promise<string>;
37
41
  transferNFTSignedTransaction: (body: import("./services/algo.tx").TransferNftKMS | import("./services/algo.tx").TransferNft, testnet?: boolean, provider?: string) => Promise<string>;
@@ -85,63 +89,6 @@ export declare const TatumAlgoSDK: (args: SDKArguments) => {
85
89
  get: typeof import("@tatumio/api-client").StorageIpfsService.getIpfsData;
86
90
  };
87
91
  subscriptions: typeof import("@tatumio/api-client").LedgerSubscriptionService;
88
- ledger: {
89
- customer: {
90
- get: typeof import("@tatumio/api-client").LedgerCustomerService.getCustomerByExternalOrInternalId;
91
- getAll: typeof import("@tatumio/api-client").LedgerCustomerService.findAllCustomers;
92
- update: typeof import("@tatumio/api-client").LedgerCustomerService.updateCustomer;
93
- activate: typeof import("@tatumio/api-client").LedgerCustomerService.activateCustomer;
94
- deactivate: typeof import("@tatumio/api-client").LedgerCustomerService.deactivateCustomer;
95
- enable: typeof import("@tatumio/api-client").LedgerCustomerService.enableCustomer;
96
- disable: typeof import("@tatumio/api-client").LedgerCustomerService.disableCustomer;
97
- };
98
- orderBook: {
99
- getHistorical: typeof import("@tatumio/api-client").LedgerOrderBookService.getHistoricalTradesBody;
100
- getActiveBuyTrades: typeof import("@tatumio/api-client").LedgerOrderBookService.getBuyTradesBody;
101
- getActiveSellTrades: typeof import("@tatumio/api-client").LedgerOrderBookService.getBuyTradesBody;
102
- newTrade: typeof import("@tatumio/api-client").LedgerOrderBookService.storeTrade;
103
- get: typeof import("@tatumio/api-client").LedgerOrderBookService.getTradeById;
104
- cancel: typeof import("@tatumio/api-client").LedgerOrderBookService.deleteTrade;
105
- cancelByAccount: typeof import("@tatumio/api-client").LedgerOrderBookService.deleteAccountTrades;
106
- };
107
- transaction: {
108
- send: typeof import("@tatumio/api-client").LedgerTransactionService.sendTransaction;
109
- sendMultiple: typeof import("@tatumio/api-client").LedgerTransactionService.sendTransactionBatch;
110
- getAll: typeof import("@tatumio/api-client").LedgerTransactionService.getTransactions;
111
- getAllByAccount: typeof import("@tatumio/api-client").LedgerTransactionService.getTransactionsByAccountId;
112
- getAllByCustomer: typeof import("@tatumio/api-client").LedgerTransactionService.getTransactionsByCustomerId;
113
- getAllByReference: typeof import("@tatumio/api-client").LedgerTransactionService.getTransactionsByReference;
114
- countByAccount: (filter: import("@tatumio/api-client").TransactionFilter) => any;
115
- countByCustomer: (filter: import("@tatumio/api-client").TransactionFilterCustomer) => any;
116
- };
117
- virtualCurrency: {
118
- create: typeof import("@tatumio/api-client").LedgerVirtualCurrencyService.createCurrency;
119
- mint: typeof import("@tatumio/api-client").LedgerVirtualCurrencyService.mintCurrency;
120
- revoke: typeof import("@tatumio/api-client").LedgerVirtualCurrencyService.revokeCurrency;
121
- getByName: typeof import("@tatumio/api-client").LedgerVirtualCurrencyService.getCurrency;
122
- update: typeof import("@tatumio/api-client").LedgerVirtualCurrencyService.updateCurrency;
123
- };
124
- blockAmount: {
125
- block: typeof import("@tatumio/api-client").LedgerAccountService.blockAmount;
126
- unblock: typeof import("@tatumio/api-client").LedgerAccountService.deleteBlockAmount;
127
- unblockWithTransaction: typeof import("@tatumio/api-client").LedgerAccountService.unblockAmountWithTransaction;
128
- };
129
- account: {
130
- get: typeof import("@tatumio/api-client").LedgerAccountService.getAccountByAccountId;
131
- getAll: typeof import("@tatumio/api-client").LedgerAccountService.getAllAccounts;
132
- getByCustomerId: typeof import("@tatumio/api-client").LedgerAccountService.getAccountsByCustomerId;
133
- getBalance: typeof import("@tatumio/api-client").LedgerAccountService.getAccountBalance;
134
- create: typeof import("@tatumio/api-client").LedgerAccountService.createAccount;
135
- createMultiple: typeof import("@tatumio/api-client").LedgerAccountService.createAccountBatch;
136
- update: typeof import("@tatumio/api-client").LedgerAccountService.updateAccountByAccountId;
137
- getBlockedAmountsByAccountId: typeof import("@tatumio/api-client").LedgerAccountService.getBlockAmountById;
138
- activate: typeof import("@tatumio/api-client").LedgerAccountService.activateAccount;
139
- deactivate: typeof import("@tatumio/api-client").LedgerAccountService.deactivateAccount;
140
- freeze: typeof import("@tatumio/api-client").LedgerAccountService.freezeAccount;
141
- unfreeze: typeof import("@tatumio/api-client").LedgerAccountService.unfreezeAccount;
142
- generate: (account: import("@tatumio/api-client").CreateAccount, generateNewWalletFn: any, generateNewWallet?: boolean, testnet?: boolean, webhookUrl?: string) => Promise<any>;
143
- };
144
- };
145
92
  security: {
146
93
  checkMaliciousAddress: typeof import("@tatumio/api-client").SecurityAddressService.checkMalicousAddress;
147
94
  };
@@ -151,26 +98,4 @@ export declare const TatumAlgoSDK: (args: SDKArguments) => {
151
98
  freezeApiKey: typeof import("@tatumio/api-client").TatumServiceService.freezeApiKey;
152
99
  unfreezeApiKey: typeof import("@tatumio/api-client").TatumServiceService.unfreezeApiKey;
153
100
  };
154
- nft: {
155
- deployNFTSmartContract: typeof import("@tatumio/api-client").BlockchainNftService.nftDeployErc721;
156
- addNFTMinter: typeof import("@tatumio/api-client").BlockchainNftService.nftAddMinter;
157
- mintNFT: typeof import("@tatumio/api-client").BlockchainNftService.nftMintErc721;
158
- mintMultipleNFTs: typeof import("@tatumio/api-client").BlockchainNftService.nftMintMultipleErc721;
159
- burnNFT: typeof import("@tatumio/api-client").BlockchainNftService.nftBurnErc721;
160
- transferNFT: typeof import("@tatumio/api-client").BlockchainNftService.nftTransferErc721;
161
- updateNFTRoyalty: typeof import("@tatumio/api-client").BlockchainNftService.nftUpdateCashbackErc721;
162
- getNFTTransaction: typeof import("@tatumio/api-client").BlockchainNftService.nftGetTransactErc721;
163
- getNFTTransactionsByToken: typeof import("@tatumio/api-client").BlockchainNftService.nftGetTransactionByToken;
164
- getNFTTransactionsByAddress: typeof import("@tatumio/api-client").BlockchainNftService.nftGetTransactionByAddress;
165
- getNFTsByAddress: typeof import("@tatumio/api-client").BlockchainNftService.nftGetBalanceErc721;
166
- getNFTProvenanceData: typeof import("@tatumio/api-client").BlockchainNftService.nftGetProvenanceDataErc721;
167
- getNFTMetadataURI: typeof import("@tatumio/api-client").BlockchainNftService.nftGetMetadataErc721;
168
- getNFTRoyalty: typeof import("@tatumio/api-client").BlockchainNftService.nftGetRoyaltyErc721;
169
- getNFTAccountBalance: typeof import("@tatumio/api-client").BlockchainNftService.nftGetBalanceErc721;
170
- getNFTImage: (chain: "ETH" | "MATIC" | "KCS" | "ONE" | "KLAY" | "BSC" | "CELO" | "FLOW" | "TRON" | "SOL", contractAddress: string, tokenId: string, account?: string) => Promise<{
171
- originalUrl: string;
172
- publicUrl: string;
173
- }>;
174
- prepareAddNftMinterAbstraction: (body: import("@tatumio/api-client").AddNftMinter | import("@tatumio/api-client").AddNftMinterKMS) => Promise<string[]>;
175
- };
176
101
  };
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.TatumAlgoSDK = void 0;
4
+ const tslib_1 = require("tslib");
4
5
  const shared_core_1 = require("@tatumio/shared-core");
5
6
  const shared_blockchain_abstract_1 = require("@tatumio/shared-blockchain-abstract");
6
7
  const api_client_1 = require("@tatumio/api-client");
@@ -12,7 +13,10 @@ const blockchain = shared_core_1.Blockchain.ALGO;
12
13
  const TatumAlgoSDK = (args) => {
13
14
  const web = (0, algo_web_1.algoWeb)();
14
15
  const txService = (0, algo_tx_1.algoTx)({ algoWeb: web });
15
- return Object.assign(Object.assign({}, (0, shared_blockchain_abstract_1.abstractBlockchainSdk)(Object.assign(Object.assign({}, args), { blockchain }))), { algoWeb: web, record: (0, algo_record_1.algoRecord)(), wallet: (0, algo_wallet_1.algoWallet)(), transaction: txService.native, erc20: txService.erc20, erc721: txService.erc721, blockchain: {
16
+ const _a = (0, shared_blockchain_abstract_1.abstractBlockchainSdk)(Object.assign(Object.assign({}, args), { blockchain })), { nft } = _a, abstractSdk = (0, tslib_1.__rest)(_a, ["nft"]);
17
+ const { transferNFT, burnNFT } = nft;
18
+ return Object.assign(Object.assign({}, abstractSdk), { algoWeb: web, record: (0, algo_record_1.algoRecord)(), wallet: (0, algo_wallet_1.algoWallet)(), transaction: txService.native, erc20: Object.assign(Object.assign({}, txService.erc20), { getErc20TransactionByAddress: api_client_1.BlockchainFungibleTokenService.erc20GetTransactionByAddress, getErc20AccountBalance: api_client_1.BlockchainFungibleTokenService.erc20GetBalance }), nft: Object.assign(Object.assign({}, txService.erc721), { transferNFT,
19
+ burnNFT }), blockchain: {
16
20
  broadcast: api_client_1.BlockchainAlgorandAlgoService.algoandBroadcast,
17
21
  getBlock: api_client_1.BlockchainAlgorandAlgoService.algorandGetBlock,
18
22
  getCurrentBlock: api_client_1.BlockchainAlgorandAlgoService.algorandGetCurrentBlock,
@@ -1 +1 @@
1
- {"version":3,"file":"algo.sdk.js","sourceRoot":"","sources":["../../../../../../packages/blockchain/algo/src/lib/algo.sdk.ts"],"names":[],"mappings":";;;AAAA,sDAAiD;AAEjD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