@tatumio/algo 2.0.1-alpha.234 → 2.0.1-alpha.237

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.234",
3
+ "version": "2.0.1-alpha.237",
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.234",
10
- "@tatumio/shared-blockchain-abstract": "2.0.1-alpha.234",
11
- "@tatumio/api-client": "2.0.1-alpha.234",
12
- "axios": "^0.24.0",
9
+ "@tatumio/shared-testing-common": "2.0.1-alpha.237",
10
+ "@tatumio/shared-blockchain-abstract": "2.0.1-alpha.237",
11
+ "@tatumio/api-client": "2.0.1-alpha.237",
12
+ "axios": "^0.25.0",
13
13
  "form-data": "^4.0.0",
14
- "@tatumio/shared-core": "2.0.1-alpha.234",
15
- "@tatumio/shared-abstract-sdk": "2.0.1-alpha.234",
14
+ "@tatumio/shared-core": "2.0.1-alpha.237",
15
+ "@tatumio/shared-abstract-sdk": "2.0.1-alpha.237",
16
16
  "bignumber.js": "^9.0.2",
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>;
@@ -151,26 +155,4 @@ export declare const TatumAlgoSDK: (args: SDKArguments) => {
151
155
  freezeApiKey: typeof import("@tatumio/api-client").TatumServiceService.freezeApiKey;
152
156
  unfreezeApiKey: typeof import("@tatumio/api-client").TatumServiceService.unfreezeApiKey;
153
157
  };
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
158
  };
@@ -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,oFAA2E;AAC3E,oDAAmE;AACnE,kDAA6C;AAC7C,wDAAmD;AACnD,wDAAmD;AACnD,gDAA2C;AAE3C,MAAM,UAAU,GAAG,wBAAU,CAAC,IAAI,CAAA;AAE3B,MAAM,YAAY,G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