@ardrive/turbo-sdk 1.33.1 → 1.34.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +9 -1
- package/bundles/web.bundle.min.js +103581 -103456
- package/lib/cjs/cli/cli.js +1 -1
- package/lib/cjs/cli/commands/cryptoFund.js +3 -1
- package/lib/cjs/common/payment.js +17 -4
- package/lib/cjs/common/signer.js +13 -1
- package/lib/cjs/common/token/ario.js +27 -19
- package/lib/cjs/common/token/arweave.js +4 -1
- package/lib/cjs/common/token/ethereum.js +32 -13
- package/lib/cjs/common/token/solana.js +11 -2
- package/lib/cjs/utils/common.js +52 -0
- package/lib/cjs/version.js +1 -1
- package/lib/esm/cli/cli.js +1 -1
- package/lib/esm/cli/commands/cryptoFund.js +3 -1
- package/lib/esm/common/payment.js +17 -4
- package/lib/esm/common/signer.js +14 -2
- package/lib/esm/common/token/ario.js +27 -19
- package/lib/esm/common/token/arweave.js +4 -1
- package/lib/esm/common/token/ethereum.js +32 -14
- package/lib/esm/common/token/solana.js +11 -2
- package/lib/esm/utils/common.js +47 -1
- package/lib/esm/version.js +1 -1
- package/lib/types/cli/commands/cryptoFund.d.ts.map +1 -1
- package/lib/types/cli/types.d.ts +1 -0
- package/lib/types/cli/types.d.ts.map +1 -1
- package/lib/types/common/payment.d.ts +1 -1
- package/lib/types/common/payment.d.ts.map +1 -1
- package/lib/types/common/signer.d.ts +1 -1
- package/lib/types/common/signer.d.ts.map +1 -1
- package/lib/types/common/token/ario.d.ts +1 -1
- package/lib/types/common/token/ario.d.ts.map +1 -1
- package/lib/types/common/token/arweave.d.ts +1 -1
- package/lib/types/common/token/arweave.d.ts.map +1 -1
- package/lib/types/common/token/ethereum.d.ts +3 -2
- package/lib/types/common/token/ethereum.d.ts.map +1 -1
- package/lib/types/common/token/solana.d.ts +2 -1
- package/lib/types/common/token/solana.d.ts.map +1 -1
- package/lib/types/types.d.ts +5 -0
- package/lib/types/types.d.ts.map +1 -1
- package/lib/types/utils/common.d.ts +6 -0
- package/lib/types/utils/common.d.ts.map +1 -1
- package/lib/types/version.d.ts +1 -1
- package/lib/types/version.d.ts.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -869,12 +869,13 @@ const { manifest, fileResponses, manifestResponse } = await turbo.uploadFolder({
|
|
|
869
869
|
});
|
|
870
870
|
```
|
|
871
871
|
|
|
872
|
-
#### `topUpWithTokens({ tokenAmount, feeMultiplier })`
|
|
872
|
+
#### `topUpWithTokens({ tokenAmount, feeMultiplier, turboCreditDestinationAddress })`
|
|
873
873
|
|
|
874
874
|
Tops up the connected wallet with Credits by submitting a payment transaction for the token amount to the Turbo wallet and then submitting that transaction id to Turbo Payment Service for top up processing.
|
|
875
875
|
|
|
876
876
|
- The `tokenAmount` is the amount of tokens in the token type's smallest unit value (e.g: Winston for arweave token type) to fund the wallet with.
|
|
877
877
|
- The `feeMultiplier` (optional) is the multiplier to apply to the reward for the transaction to modify its chances of being mined. Credits will be added to the wallet balance after the transaction is confirmed on the given blockchain. Defaults to 1.0, meaning no multiplier.
|
|
878
|
+
- The `turboCreditDestinationAddress` (optional) is the native address to credit the funds to. If not provided, the connected wallet's native address will be used. Note: Not available for KYVE token type.
|
|
878
879
|
|
|
879
880
|
##### Arweave (AR) Crypto Top Up
|
|
880
881
|
|
|
@@ -884,6 +885,7 @@ const turbo = TurboFactory.authenticated({ signer, token: 'arweave' });
|
|
|
884
885
|
const { winc, status, id, ...fundResult } = await turbo.topUpWithTokens({
|
|
885
886
|
tokenAmount: WinstonToTokenAmount(100_000_000), // 0.0001 AR
|
|
886
887
|
feeMultiplier: 1.1, // 10% increase in reward for improved mining chances
|
|
888
|
+
turboCreditDestinationAddress: '0xabc...123', // Any custom EVM / SOL / AR / KYVE native destination address
|
|
887
889
|
});
|
|
888
890
|
```
|
|
889
891
|
|
|
@@ -1185,6 +1187,7 @@ Command Options:
|
|
|
1185
1187
|
|
|
1186
1188
|
- `-v, --value <value>` - Value of crypto token for fund. e.g: 0.0001 for 0.0001 KYVE
|
|
1187
1189
|
- `-i, --tx-id <txId>` - Transaction ID of an existing funding transaction
|
|
1190
|
+
- `-a, --address <nativeAddress>` - Optional native address to send the Turbo credits to
|
|
1188
1191
|
|
|
1189
1192
|
e.g:
|
|
1190
1193
|
|
|
@@ -1205,6 +1208,11 @@ turbo crypto-fund --value 100 --token ario --wallet-file ../path/to/arweave/wall
|
|
|
1205
1208
|
turbo crypto-fund --value 100 --token ario --process-id agYcCFJtrMG6cqMuZfskIkFTGvUPddICmtQSBIoPdiA --cu-url https://cu.ao-testnet.xyz
|
|
1206
1209
|
```
|
|
1207
1210
|
|
|
1211
|
+
```shell
|
|
1212
|
+
# Send to custom destination address
|
|
1213
|
+
turbo crypto-fund --value 100 --token ario --wallet-file ../path/to/arweave/wallet/with/ario.json --address 'Any-Valid-AR-EVM-SOL-KYVE-Native-Address'
|
|
1214
|
+
```
|
|
1215
|
+
|
|
1208
1216
|
##### `upload-folder`
|
|
1209
1217
|
|
|
1210
1218
|
Upload a folder of files and create and upload a manifest file for the folder upload to the Turbo Upload Service.
|