@ardrive/turbo-sdk 1.20.0-alpha.3 → 1.20.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 +5 -5
- package/bundles/web.bundle.min.js +1 -1
- package/lib/cjs/version.js +1 -1
- package/lib/esm/version.js +1 -1
- package/lib/types/version.d.ts +1 -1
- package/package.json +2 -4
package/README.md
CHANGED
@@ -942,29 +942,29 @@ turbo list-shares --address 2cor...VUa --wallet-file ../path/to/my/wallet
|
|
942
942
|
|
943
943
|
## Turbo Credit Sharing
|
944
944
|
|
945
|
-
Users can share their purchased Credits with other
|
945
|
+
Users can share their purchased Credits with other users' wallets by creating Credit Share Approvals. These approvals are created by uploading a signed data item with tags indicating the recipient's wallet address, the amount of Credits to share, and an optional amount of seconds that the approval will expire in. The recipient can then use the shared Credits to pay for their own uploads to Turbo.
|
946
946
|
|
947
|
-
Shared Credits cannot be re-shared by the recipient to other recipients. Only the owner of the Credits can share or revoke Credit Share Approvals. Credits that are shared to other wallets may not be used by the original owner of the Credits for sharing or uploading unless the Credit Share Approval is revoked or expired.
|
947
|
+
Shared Credits cannot be re-shared by the recipient to other recipients. Only the original owner of the Credits can share or revoke Credit Share Approvals. Credits that are shared to other wallets may not be used by the original owner of the Credits for sharing or uploading unless the Credit Share Approval is revoked or expired.
|
948
948
|
|
949
949
|
Approvals can be revoked at any time by similarly uploading a signed data item with tags indicating the recipient's wallet address. This will remove all approvals and prevent the recipient from using the shared Credits. All unused Credits from expired or revoked approvals are returned to the original owner of the Credits.
|
950
950
|
|
951
951
|
To use the shared Credits, recipient users must provide the wallet address of the user who shared the Credits with them in the `x-paid-by` HTTP header when uploading data. This tells Turbo services to look for and use Credit Share Approvals to pay for the upload before using the signer's balance.
|
952
952
|
|
953
|
-
For user convenience, during upload the Turbo CLI will use any available Credit Share Approvals found for the connected wallet before using the signing wallet's balance. To instead ignore all Credit shares and only use the signer's balance, use the `--ignore-approvals` flag. To use the signer's balance first before using Credit shares, use the `--use-signer-balance-first` flag.
|
953
|
+
For user convenience, during upload the Turbo CLI will use any available Credit Share Approvals found for the connected wallet before using the signing wallet's balance. To instead ignore all Credit shares and only use the signer's balance, use the `--ignore-approvals` flag. To use the signer's balance first before using Credit shares, use the `--use-signer-balance-first` flag. In contrast, the Turbo SDK layer does not provide this functionality and will only use approvals when `paidBy` is provided.
|
954
954
|
|
955
955
|
The Turbo SDK provides the following methods to manage Credit Share Approvals:
|
956
956
|
|
957
957
|
- `shareCredits`: Creates a Credit Share Approval for the specified wallet address and amount of Credits.
|
958
958
|
- `revokeCredits`: Revokes all Credit Share Approvals for the specified wallet address.
|
959
959
|
- `listShares`: Lists all Credit Share Approvals for the specified wallet address or connected wallet.
|
960
|
-
- `dataItemOpts: { ...opts, paidBy: string[] }`: Upload methods now accept an array of wallet addresses to pay for the upload.
|
960
|
+
- `dataItemOpts: { ...opts, paidBy: string[] }`: Upload methods now accept 'paidBy', an array of wallet addresses that have provided credit share approvals to the user from which to pay, in the order provided and as necessary, for the upload.
|
961
961
|
|
962
962
|
The Turbo CLI provides the following commands to manage Credit Share Approvals:
|
963
963
|
|
964
964
|
- `share-credits`: Creates a Credit Share Approval for the specified wallet address and amount of Credits.
|
965
965
|
- `revoke-credits`: Revokes all Credit Share Approvals for the specified wallet address.
|
966
966
|
- `list-shares`: Lists all Credit Share Approvals for the specified wallet address or connected wallet.
|
967
|
-
- `paidBy: --paid-by <paidBy...>`: Upload commands now accept an array of wallet addresses to pay for the upload.
|
967
|
+
- `paidBy: --paid-by <paidBy...>`: Upload commands now accept '--paid-by', an array of wallet addresses that have provided credit share approvals to the user from which to pay, in the order provided and as necessary, for the upload.
|
968
968
|
- `--ignore-approvals`: Ignore all Credit Share Approvals and only use the signer's balance.
|
969
969
|
- `--use-signer-balance-first`: Use the signer's balance first before using Credit Share Approvals.
|
970
970
|
|
@@ -310551,7 +310551,7 @@ var import_winston = __toESM(require_winston(), 1);
|
|
310551
310551
|
init_dirname();
|
310552
310552
|
init_buffer2();
|
310553
310553
|
init_process2();
|
310554
|
-
var version16 = "1.20.0-alpha.
|
310554
|
+
var version16 = "1.20.0-alpha.4";
|
310555
310555
|
|
310556
310556
|
// src/common/logger.ts
|
310557
310557
|
var TurboWinstonLogger = class _TurboWinstonLogger {
|
package/lib/cjs/version.js
CHANGED
package/lib/esm/version.js
CHANGED
package/lib/types/version.d.ts
CHANGED
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@ardrive/turbo-sdk",
|
3
|
-
"version": "1.20.0
|
3
|
+
"version": "1.20.0",
|
4
4
|
"main": "./lib/cjs/node/index.js",
|
5
5
|
"types": "./lib/types/node/index.d.ts",
|
6
6
|
"module": "./lib/esm/node/index.js",
|
@@ -92,12 +92,10 @@
|
|
92
92
|
"mime-types": "^2.1.35",
|
93
93
|
"plimit-lit": "^3.0.1",
|
94
94
|
"prompts": "^2.4.2",
|
95
|
+
"starknet": "^6.11.0",
|
95
96
|
"tweetnacl": "^1.0.3",
|
96
97
|
"winston": "^3.14.1"
|
97
98
|
},
|
98
|
-
"resolutions": {
|
99
|
-
"@keplr-wallet/cosmos": "0.12.123"
|
100
|
-
},
|
101
99
|
"devDependencies": {
|
102
100
|
"@commitlint/cli": "^17.1.2",
|
103
101
|
"@commitlint/config-conventional": "^17.1.0",
|