@ardrive/turbo-sdk 1.28.2 → 1.28.3

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.
@@ -97,13 +97,11 @@ exports.optionMap = {
97
97
  default: false,
98
98
  },
99
99
  debug: {
100
- // TODO: Implement
101
100
  alias: '--debug',
102
101
  description: 'Enable verbose logging',
103
102
  default: false,
104
103
  },
105
104
  quiet: {
106
- // TODO: Implement
107
105
  alias: '--quiet',
108
106
  description: 'Disable logging',
109
107
  default: false,
@@ -194,6 +194,12 @@ function configFromOptions(options) {
194
194
  }
195
195
  async function turboFromOptions(options) {
196
196
  const privateKey = await privateKeyFromOptions(options);
197
+ if (options.debug) {
198
+ index_js_1.TurboFactory.setLogLevel('debug');
199
+ }
200
+ if (options.quiet) {
201
+ index_js_1.TurboFactory.setLogLevel('none');
202
+ }
197
203
  return index_js_1.TurboFactory.authenticated({
198
204
  ...configFromOptions(options),
199
205
  privateKey,
@@ -24,7 +24,6 @@ const crypto_1 = require("@cosmjs/crypto");
24
24
  const encoding_1 = require("@cosmjs/encoding");
25
25
  const arbundles_1 = require("@dha-team/arbundles");
26
26
  const signing_key_1 = require("@ethersproject/signing-key");
27
- const sdk_js_1 = require("@kyvejs/sdk/dist/sdk.js");
28
27
  const bs58_1 = __importDefault(require("bs58"));
29
28
  const crypto_2 = require("crypto");
30
29
  const ethers_1 = require("ethers");
@@ -99,18 +98,6 @@ class TurboDataItemAbstractSigner {
99
98
  throw new Error('Only EthereumSigner is supported for sendTransaction API currently!');
100
99
  }
101
100
  const keyAsStringFromUint8Array = Buffer.from(this.signer.key).toString('hex');
102
- if (this.token === 'kyve') {
103
- const chainId = gatewayUrl.includes('kaon')
104
- ? 'kaon-1'
105
- : gatewayUrl.includes('korellia')
106
- ? 'korellia-2'
107
- : 'kyve-1';
108
- // TODO: KYVE Web wallet tx signing/sending
109
- const client = await new sdk_js_1.KyveSDK(chainId).fromPrivateKey(keyAsStringFromUint8Array);
110
- const tx = await client.cosmos.bank.v1beta1.transfer(target, amount.toString());
111
- await tx.execute();
112
- return tx.txHash;
113
- }
114
101
  const provider = new ethers_1.ethers.JsonRpcProvider(gatewayUrl);
115
102
  const ethWalletAndProvider = new ethers_1.Wallet(keyAsStringFromUint8Array, provider);
116
103
  const tx = await ethWalletAndProvider.sendTransaction({
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.KyveToken = exports.KYVEToTokenAmount = exports.ukyveToTokenAmount = void 0;
3
+ exports.SUPPORTED_CHAIN_CONFIGS = exports.KyveToken = exports.KYVEToTokenAmount = exports.ukyveToTokenAmount = void 0;
4
4
  exports.signerFromKyvePrivateKey = signerFromKyvePrivateKey;
5
5
  exports.privateKeyFromKyveMnemonic = privateKeyFromKyveMnemonic;
6
6
  exports.signerFromKyveMnemonic = signerFromKyveMnemonic;
@@ -22,6 +22,8 @@ exports.signerFromKyveMnemonic = signerFromKyveMnemonic;
22
22
  const amino_1 = require("@cosmjs/amino");
23
23
  const crypto_1 = require("@cosmjs/crypto");
24
24
  const encoding_1 = require("@cosmjs/encoding");
25
+ const proto_signing_1 = require("@cosmjs/proto-signing");
26
+ const stargate_1 = require("@cosmjs/stargate");
25
27
  const arbundles_1 = require("@dha-team/arbundles");
26
28
  const bignumber_js_1 = require("bignumber.js");
27
29
  const constants_js_1 = require("../../cli/constants.js");
@@ -46,12 +48,23 @@ class KyveToken {
46
48
  this.pollingOptions = pollingOptions;
47
49
  }
48
50
  async createAndSubmitTx({ target, tokenAmount, signer, }) {
49
- const id = await signer.sendTransaction({
50
- amount: tokenAmount,
51
+ this.logger.debug('Creating and submitting transaction...', {
51
52
  target,
52
- gatewayUrl: this.gatewayUrl,
53
+ tokenAmount,
54
+ signer,
53
55
  });
54
- return { id, target };
56
+ const chainId = this.gatewayUrl.includes('kaon')
57
+ ? 'kaon-1'
58
+ : this.gatewayUrl.includes('korellia')
59
+ ? 'korellia-2'
60
+ : 'kyve-1';
61
+ const txHash = await this.sendTokens({
62
+ chainId,
63
+ privateKeyUint8Array: signer['signer'].key,
64
+ recipientAddress: target,
65
+ amount: tokenAmount.toString(),
66
+ });
67
+ return { id: txHash, target };
55
68
  }
56
69
  async pollForTxBeingAvailable({ txId, }) {
57
70
  const { maxAttempts, pollingIntervalMs, initialBackoffMs } = this.pollingOptions;
@@ -91,6 +104,35 @@ class KyveToken {
91
104
  }
92
105
  throw new Error('Transaction not found after polling, transaction id: ' + txId);
93
106
  }
107
+ // ref: https://github.com/KYVENetwork/kyvejs/blob/e6c68b007fb50ab026e60ea6eaadf37b7cf8c76f/common/sdk/src/clients/rpc-client/signing.ts#L109-L183
108
+ async sendTokens({ chainId, privateKeyUint8Array, recipientAddress, amount, gasMultiplier = 1.5, }) {
109
+ const config = exports.SUPPORTED_CHAIN_CONFIGS[chainId];
110
+ if (config === undefined) {
111
+ throw new Error(`Unsupported chain ID: ${chainId}`);
112
+ }
113
+ const wallet = await proto_signing_1.DirectSecp256k1Wallet.fromKey(privateKeyUint8Array, 'kyve');
114
+ const [account] = await wallet.getAccounts();
115
+ const senderAddress = account.address;
116
+ const gasPrice = stargate_1.GasPrice.fromString(`${config.gasPrice}${config.coinDenom}`);
117
+ const client = await stargate_1.SigningStargateClient.connectWithSigner(config.rpc, wallet, { gasPrice });
118
+ // Create MsgSend message
119
+ const msg = {
120
+ fromAddress: senderAddress,
121
+ toAddress: recipientAddress,
122
+ amount: [{ denom: config.coinDenom, amount }],
123
+ };
124
+ const encodedMsg = {
125
+ typeUrl: '/cosmos.bank.v1beta1.MsgSend',
126
+ value: msg,
127
+ };
128
+ // Simulate gas usage
129
+ const gasEstimate = await client.simulate(senderAddress, [encodedMsg], '');
130
+ // Calculate fee with buffer
131
+ const fee = (0, stargate_1.calculateFee)(Math.round(gasEstimate * gasMultiplier), stargate_1.GasPrice.fromString(`${config.gasPrice}${config.coinDenom}`));
132
+ // Send the actual transaction
133
+ const result = await client.sendTokens(senderAddress, recipientAddress, [{ denom: config.coinDenom, amount }], fee, '');
134
+ return result.transactionHash;
135
+ }
94
136
  }
95
137
  exports.KyveToken = KyveToken;
96
138
  function signerFromKyvePrivateKey(privateKey) {
@@ -107,3 +149,66 @@ async function signerFromKyveMnemonic(mnemonic) {
107
149
  const privateKey = await privateKeyFromKyveMnemonic(mnemonic);
108
150
  return signerFromKyvePrivateKey(privateKey);
109
151
  }
152
+ // ref: https://github.com/KYVENetwork/kyvejs/blob/e6c68b007fb50ab026e60ea6eaadf37b7cf8c76f/common/sdk/src/constants.ts#L26-L89
153
+ exports.SUPPORTED_CHAIN_CONFIGS = {
154
+ 'kyve-1': {
155
+ chainId: 'kyve-1',
156
+ chainName: 'KYVE',
157
+ rpc: 'https://rpc.kyve.network',
158
+ rest: 'https://api.kyve.network',
159
+ coin: 'KYVE',
160
+ coinDenom: 'ukyve',
161
+ coinDecimals: 6,
162
+ gasPrice: 2,
163
+ },
164
+ 'kaon-1': {
165
+ chainId: 'kaon-1',
166
+ chainName: 'KYVE Kaon',
167
+ rpc: 'https://rpc.kaon.kyve.network',
168
+ rest: 'https://api.kaon.kyve.network',
169
+ coin: 'KYVE',
170
+ coinDenom: 'tkyve',
171
+ coinDecimals: 6,
172
+ gasPrice: 2,
173
+ },
174
+ 'korellia-2': {
175
+ chainId: 'korellia-2',
176
+ chainName: 'KYVE Korellia',
177
+ rpc: 'https://rpc.korellia.kyve.network',
178
+ rest: 'https://api.korellia.kyve.network',
179
+ coin: 'KYVE',
180
+ coinDenom: 'tkyve',
181
+ coinDecimals: 6,
182
+ gasPrice: 2,
183
+ },
184
+ 'kyve-beta': {
185
+ chainId: 'kyve-beta',
186
+ chainName: 'KYVE-Beta',
187
+ rpc: 'https://rpc.beta.kyve.network',
188
+ rest: 'https://api.beta.kyve.network',
189
+ coin: 'KYVE',
190
+ coinDenom: 'tkyve',
191
+ coinDecimals: 6,
192
+ gasPrice: 2,
193
+ },
194
+ 'kyve-alpha': {
195
+ chainId: 'kyve-alpha',
196
+ chainName: 'KYVE Alpha',
197
+ rpc: 'https://rpc.alpha.kyve.network',
198
+ rest: 'https://api.alpha.kyve.network',
199
+ coin: 'KYVE',
200
+ coinDenom: 'tkyve',
201
+ coinDecimals: 6,
202
+ gasPrice: 2,
203
+ },
204
+ 'kyve-local': {
205
+ chainId: 'kyve-local',
206
+ chainName: 'KYVE Local',
207
+ rpc: 'http://0.0.0.0:26657',
208
+ rest: 'http://0.0.0.0:1317',
209
+ coin: 'KYVE',
210
+ coinDenom: 'tkyve',
211
+ coinDecimals: 6,
212
+ gasPrice: 2,
213
+ },
214
+ };
@@ -17,4 +17,4 @@
17
17
  Object.defineProperty(exports, "__esModule", { value: true });
18
18
  exports.version = void 0;
19
19
  // AUTOMATICALLY GENERATED FILE - DO NOT TOUCH
20
- exports.version = '1.28.2';
20
+ exports.version = '1.28.3';
@@ -94,13 +94,11 @@ export const optionMap = {
94
94
  default: false,
95
95
  },
96
96
  debug: {
97
- // TODO: Implement
98
97
  alias: '--debug',
99
98
  description: 'Enable verbose logging',
100
99
  default: false,
101
100
  },
102
101
  quiet: {
103
- // TODO: Implement
104
102
  alias: '--quiet',
105
103
  description: 'Disable logging',
106
104
  default: false,
@@ -172,6 +172,12 @@ export function configFromOptions(options) {
172
172
  }
173
173
  export async function turboFromOptions(options) {
174
174
  const privateKey = await privateKeyFromOptions(options);
175
+ if (options.debug) {
176
+ TurboFactory.setLogLevel('debug');
177
+ }
178
+ if (options.quiet) {
179
+ TurboFactory.setLogLevel('none');
180
+ }
175
181
  return TurboFactory.authenticated({
176
182
  ...configFromOptions(options),
177
183
  privateKey,
@@ -18,7 +18,6 @@ import { Secp256k1 } from '@cosmjs/crypto';
18
18
  import { toBase64 } from '@cosmjs/encoding';
19
19
  import { EthereumSigner, HexSolanaSigner } from '@dha-team/arbundles';
20
20
  import { computePublicKey } from '@ethersproject/signing-key';
21
- import { KyveSDK } from '@kyvejs/sdk/dist/sdk.js';
22
21
  import bs58 from 'bs58';
23
22
  import { randomBytes } from 'crypto';
24
23
  import { Wallet as EthereumWallet, ethers, parseEther } from 'ethers';
@@ -93,18 +92,6 @@ export class TurboDataItemAbstractSigner {
93
92
  throw new Error('Only EthereumSigner is supported for sendTransaction API currently!');
94
93
  }
95
94
  const keyAsStringFromUint8Array = Buffer.from(this.signer.key).toString('hex');
96
- if (this.token === 'kyve') {
97
- const chainId = gatewayUrl.includes('kaon')
98
- ? 'kaon-1'
99
- : gatewayUrl.includes('korellia')
100
- ? 'korellia-2'
101
- : 'kyve-1';
102
- // TODO: KYVE Web wallet tx signing/sending
103
- const client = await new KyveSDK(chainId).fromPrivateKey(keyAsStringFromUint8Array);
104
- const tx = await client.cosmos.bank.v1beta1.transfer(target, amount.toString());
105
- await tx.execute();
106
- return tx.txHash;
107
- }
108
95
  const provider = new ethers.JsonRpcProvider(gatewayUrl);
109
96
  const ethWalletAndProvider = new EthereumWallet(keyAsStringFromUint8Array, provider);
110
97
  const tx = await ethWalletAndProvider.sendTransaction({
@@ -16,6 +16,8 @@
16
16
  import { Secp256k1HdWallet, makeCosmoshubPath } from '@cosmjs/amino';
17
17
  import { Slip10, Slip10Curve } from '@cosmjs/crypto';
18
18
  import { toHex } from '@cosmjs/encoding';
19
+ import { DirectSecp256k1Wallet } from '@cosmjs/proto-signing';
20
+ import { GasPrice, SigningStargateClient, calculateFee, } from '@cosmjs/stargate';
19
21
  import { EthereumSigner } from '@dha-team/arbundles';
20
22
  import { BigNumber } from 'bignumber.js';
21
23
  import { defaultProdGatewayUrls } from '../../cli/constants.js';
@@ -38,12 +40,23 @@ export class KyveToken {
38
40
  this.pollingOptions = pollingOptions;
39
41
  }
40
42
  async createAndSubmitTx({ target, tokenAmount, signer, }) {
41
- const id = await signer.sendTransaction({
42
- amount: tokenAmount,
43
+ this.logger.debug('Creating and submitting transaction...', {
43
44
  target,
44
- gatewayUrl: this.gatewayUrl,
45
+ tokenAmount,
46
+ signer,
45
47
  });
46
- return { id, target };
48
+ const chainId = this.gatewayUrl.includes('kaon')
49
+ ? 'kaon-1'
50
+ : this.gatewayUrl.includes('korellia')
51
+ ? 'korellia-2'
52
+ : 'kyve-1';
53
+ const txHash = await this.sendTokens({
54
+ chainId,
55
+ privateKeyUint8Array: signer['signer'].key,
56
+ recipientAddress: target,
57
+ amount: tokenAmount.toString(),
58
+ });
59
+ return { id: txHash, target };
47
60
  }
48
61
  async pollForTxBeingAvailable({ txId, }) {
49
62
  const { maxAttempts, pollingIntervalMs, initialBackoffMs } = this.pollingOptions;
@@ -83,6 +96,35 @@ export class KyveToken {
83
96
  }
84
97
  throw new Error('Transaction not found after polling, transaction id: ' + txId);
85
98
  }
99
+ // ref: https://github.com/KYVENetwork/kyvejs/blob/e6c68b007fb50ab026e60ea6eaadf37b7cf8c76f/common/sdk/src/clients/rpc-client/signing.ts#L109-L183
100
+ async sendTokens({ chainId, privateKeyUint8Array, recipientAddress, amount, gasMultiplier = 1.5, }) {
101
+ const config = SUPPORTED_CHAIN_CONFIGS[chainId];
102
+ if (config === undefined) {
103
+ throw new Error(`Unsupported chain ID: ${chainId}`);
104
+ }
105
+ const wallet = await DirectSecp256k1Wallet.fromKey(privateKeyUint8Array, 'kyve');
106
+ const [account] = await wallet.getAccounts();
107
+ const senderAddress = account.address;
108
+ const gasPrice = GasPrice.fromString(`${config.gasPrice}${config.coinDenom}`);
109
+ const client = await SigningStargateClient.connectWithSigner(config.rpc, wallet, { gasPrice });
110
+ // Create MsgSend message
111
+ const msg = {
112
+ fromAddress: senderAddress,
113
+ toAddress: recipientAddress,
114
+ amount: [{ denom: config.coinDenom, amount }],
115
+ };
116
+ const encodedMsg = {
117
+ typeUrl: '/cosmos.bank.v1beta1.MsgSend',
118
+ value: msg,
119
+ };
120
+ // Simulate gas usage
121
+ const gasEstimate = await client.simulate(senderAddress, [encodedMsg], '');
122
+ // Calculate fee with buffer
123
+ const fee = calculateFee(Math.round(gasEstimate * gasMultiplier), GasPrice.fromString(`${config.gasPrice}${config.coinDenom}`));
124
+ // Send the actual transaction
125
+ const result = await client.sendTokens(senderAddress, recipientAddress, [{ denom: config.coinDenom, amount }], fee, '');
126
+ return result.transactionHash;
127
+ }
86
128
  }
87
129
  export function signerFromKyvePrivateKey(privateKey) {
88
130
  // TODO: Use KyveSigner when implemented for on chain native address support
@@ -98,3 +140,66 @@ export async function signerFromKyveMnemonic(mnemonic) {
98
140
  const privateKey = await privateKeyFromKyveMnemonic(mnemonic);
99
141
  return signerFromKyvePrivateKey(privateKey);
100
142
  }
143
+ // ref: https://github.com/KYVENetwork/kyvejs/blob/e6c68b007fb50ab026e60ea6eaadf37b7cf8c76f/common/sdk/src/constants.ts#L26-L89
144
+ export const SUPPORTED_CHAIN_CONFIGS = {
145
+ 'kyve-1': {
146
+ chainId: 'kyve-1',
147
+ chainName: 'KYVE',
148
+ rpc: 'https://rpc.kyve.network',
149
+ rest: 'https://api.kyve.network',
150
+ coin: 'KYVE',
151
+ coinDenom: 'ukyve',
152
+ coinDecimals: 6,
153
+ gasPrice: 2,
154
+ },
155
+ 'kaon-1': {
156
+ chainId: 'kaon-1',
157
+ chainName: 'KYVE Kaon',
158
+ rpc: 'https://rpc.kaon.kyve.network',
159
+ rest: 'https://api.kaon.kyve.network',
160
+ coin: 'KYVE',
161
+ coinDenom: 'tkyve',
162
+ coinDecimals: 6,
163
+ gasPrice: 2,
164
+ },
165
+ 'korellia-2': {
166
+ chainId: 'korellia-2',
167
+ chainName: 'KYVE Korellia',
168
+ rpc: 'https://rpc.korellia.kyve.network',
169
+ rest: 'https://api.korellia.kyve.network',
170
+ coin: 'KYVE',
171
+ coinDenom: 'tkyve',
172
+ coinDecimals: 6,
173
+ gasPrice: 2,
174
+ },
175
+ 'kyve-beta': {
176
+ chainId: 'kyve-beta',
177
+ chainName: 'KYVE-Beta',
178
+ rpc: 'https://rpc.beta.kyve.network',
179
+ rest: 'https://api.beta.kyve.network',
180
+ coin: 'KYVE',
181
+ coinDenom: 'tkyve',
182
+ coinDecimals: 6,
183
+ gasPrice: 2,
184
+ },
185
+ 'kyve-alpha': {
186
+ chainId: 'kyve-alpha',
187
+ chainName: 'KYVE Alpha',
188
+ rpc: 'https://rpc.alpha.kyve.network',
189
+ rest: 'https://api.alpha.kyve.network',
190
+ coin: 'KYVE',
191
+ coinDenom: 'tkyve',
192
+ coinDecimals: 6,
193
+ gasPrice: 2,
194
+ },
195
+ 'kyve-local': {
196
+ chainId: 'kyve-local',
197
+ chainName: 'KYVE Local',
198
+ rpc: 'http://0.0.0.0:26657',
199
+ rest: 'http://0.0.0.0:1317',
200
+ coin: 'KYVE',
201
+ coinDenom: 'tkyve',
202
+ coinDecimals: 6,
203
+ gasPrice: 2,
204
+ },
205
+ };
@@ -14,4 +14,4 @@
14
14
  * limitations under the License.
15
15
  */
16
16
  // AUTOMATICALLY GENERATED FILE - DO NOT TOUCH
17
- export const version = '1.28.2';
17
+ export const version = '1.28.3';
@@ -1 +1 @@
1
- {"version":3,"file":"options.d.ts","sourceRoot":"","sources":["../../../src/cli/options.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAwJZ,CAAC;AAEX,eAAO,MAAM,aAAa;;;;;;;;;IAIzB,CAAC;AAEF,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAUzB,CAAC;AAEF,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;IAMzB,CAAC;AAEF,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAO/B,CAAC;AAEF,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAAyC,CAAC;AAExE,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;IAK/B,CAAC;AAEF,eAAO,MAAM,oBAAoB;;;;;;;;;;;;IAAwC,CAAC;AAE1E,eAAO,MAAM,iBAAiB;;;;;;;;;;;;IAAuB,CAAC"}
1
+ {"version":3,"file":"options.d.ts","sourceRoot":"","sources":["../../../src/cli/options.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAsJZ,CAAC;AAEX,eAAO,MAAM,aAAa;;;;;;;;;IAIzB,CAAC;AAEF,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAUzB,CAAC;AAEF,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;IAMzB,CAAC;AAEF,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAO/B,CAAC;AAEF,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAAyC,CAAC;AAExE,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;IAK/B,CAAC;AAEF,eAAO,MAAM,oBAAoB;;;;;;;;;;;;IAAwC,CAAC;AAE1E,eAAO,MAAM,iBAAiB;;;;;;;;;;;;IAAuB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/cli/utils.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAGlD,OAAO,EACL,QAAQ,EACR,SAAS,EACT,wBAAwB,EAExB,iCAAiC,EAOlC,MAAM,kBAAkB,CAAC;AAO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GACd,EAAE,yBAAyB;IAO5B,QAAQ,CAAC,YAAY,CAAC,EACpB,iBAAiB,EACjB,eAAe,EACf,YAAY,EACZ,OAAO,GACR,EAAE,gBAAgB,CAAC,iBAAiB,CAAC,GAAG,OAAO,CAAC,0BAA0B,CAAC;IAE5E,OAAO,CAAC,oBAAoB;IA4Bf,4BAA4B;;;;;IAY5B,YAAY,IAAI,OAAO,CAAC,MAAM,CAAC;IAI/B,gBAAgB,IAAI,OAAO,CAAC,aAAa,CAAC;IAOvD,gGAAgG;IACnF,eAAe,CAAC,EAC3B,MAAM,EACN,MAAM,EACN,UAAU,GACX,EAAE,sBAAsB,GAAG,OAAO,CAAC,MAAM,CAAC;IA6C9B,QAAQ,CAAC,UAAU,EAAE,UAAU,GAAG,OAAO,CAAC,UAAU,CAAC;CAgBnE"}
@@ -14,8 +14,71 @@ export declare class KyveToken implements TokenTools {
14
14
  pollForTxBeingAvailable({ txId, }: {
15
15
  txId: string;
16
16
  }): Promise<void>;
17
+ private sendTokens;
17
18
  }
18
19
  export declare function signerFromKyvePrivateKey(privateKey: string): TurboSigner;
19
20
  export declare function privateKeyFromKyveMnemonic(mnemonic: string): Promise<string>;
20
21
  export declare function signerFromKyveMnemonic(mnemonic: string): Promise<TurboSigner>;
22
+ export declare const SUPPORTED_CHAIN_CONFIGS: {
23
+ 'kyve-1': {
24
+ chainId: string;
25
+ chainName: string;
26
+ rpc: string;
27
+ rest: string;
28
+ coin: string;
29
+ coinDenom: string;
30
+ coinDecimals: number;
31
+ gasPrice: number;
32
+ };
33
+ 'kaon-1': {
34
+ chainId: string;
35
+ chainName: string;
36
+ rpc: string;
37
+ rest: string;
38
+ coin: string;
39
+ coinDenom: string;
40
+ coinDecimals: number;
41
+ gasPrice: number;
42
+ };
43
+ 'korellia-2': {
44
+ chainId: string;
45
+ chainName: string;
46
+ rpc: string;
47
+ rest: string;
48
+ coin: string;
49
+ coinDenom: string;
50
+ coinDecimals: number;
51
+ gasPrice: number;
52
+ };
53
+ 'kyve-beta': {
54
+ chainId: string;
55
+ chainName: string;
56
+ rpc: string;
57
+ rest: string;
58
+ coin: string;
59
+ coinDenom: string;
60
+ coinDecimals: number;
61
+ gasPrice: number;
62
+ };
63
+ 'kyve-alpha': {
64
+ chainId: string;
65
+ chainName: string;
66
+ rpc: string;
67
+ rest: string;
68
+ coin: string;
69
+ coinDenom: string;
70
+ coinDecimals: number;
71
+ gasPrice: number;
72
+ };
73
+ 'kyve-local': {
74
+ chainId: string;
75
+ chainName: string;
76
+ rpc: string;
77
+ rest: string;
78
+ coin: string;
79
+ coinDenom: string;
80
+ coinDecimals: number;
81
+ gasPrice: number;
82
+ };
83
+ };
21
84
  //# sourceMappingURL=kyve.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"kyve.d.ts","sourceRoot":"","sources":["../../../../src/common/token/kyve.ts"],"names":[],"mappings":"AAoBA,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAGzC,OAAO,EACL,WAAW,EACX,mBAAmB,EACnB,mBAAmB,EACnB,UAAU,EACV,WAAW,EACX,WAAW,EACZ,MAAM,gBAAgB,CAAC;AA8CxB,eAAO,MAAM,kBAAkB,YAAa,SAAS,CAAC,KAAK,oBAAY,CAAC;AACxE,eAAO,MAAM,iBAAiB,QAAS,SAAS,CAAC,KAAK,WACb,CAAC;AAE1C,qBAAa,SAAU,YAAW,UAAU;IAC1C,SAAS,CAAC,MAAM,EAAE,WAAW,CAAC;IAC9B,SAAS,CAAC,UAAU,EAAE,MAAM,CAAC;IAC7B,SAAS,CAAC,cAAc,EAAE,mBAAmB,CAAC;gBAElC,EACV,MAAmC,EACnC,UAAwC,EACxC,cAIC,GACF,EAAE,WAAW;IAOD,iBAAiB,CAAC,EAC7B,MAAM,EACN,WAAW,EACX,MAAM,GACP,EAAE,mBAAmB,GAAG,OAAO,CAAC;QAC/B,EAAE,EAAE,MAAM,CAAC;QACX,MAAM,EAAE,MAAM,CAAC;KAChB,CAAC;IAUW,uBAAuB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AAgB,wBAAwB,CAAC,UAAU,EAAE,MAAM,GAAG,WAAW,CAGxE;AAED,wBAAsB,0BAA0B,CAC9C,QAAQ,EAAE,MAAM,GACf,OAAO,CAAC,MAAM,CAAC,CAYjB;AAED,wBAAsB,sBAAsB,CAC1C,QAAQ,EAAE,MAAM,GACf,OAAO,CAAC,WAAW,CAAC,CAItB;AAGD,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6DnC,CAAC"}
@@ -13,5 +13,5 @@
13
13
  * See the License for the specific language governing permissions and
14
14
  * limitations under the License.
15
15
  */
16
- export declare const version = "1.28.2-alpha.1";
16
+ export declare const version = "1.28.3-alpha.1";
17
17
  //# sourceMappingURL=version.d.ts.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ardrive/turbo-sdk",
3
- "version": "1.28.2",
3
+ "version": "1.28.3",
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",
@@ -76,20 +76,16 @@
76
76
  "docs": "markdown-toc-gen insert README.md --max-depth 3"
77
77
  },
78
78
  "dependencies": {
79
- "@cosmjs/amino": "^0.32.4",
80
- "@cosmjs/crypto": "^0.32.4",
81
- "@cosmjs/encoding": "^0.32.4",
82
- "@cosmjs/proto-signing": "^0.32.4",
79
+ "@cosmjs/proto-signing": "^0.33.1",
80
+ "@cosmjs/stargate": "^0.33.1",
83
81
  "@dha-team/arbundles": "^1.0.1",
84
82
  "@ethersproject/signing-key": "^5.7.0",
85
- "@kyvejs/sdk": "^1.4.5",
86
83
  "@permaweb/aoconnect": "0.0.57",
87
84
  "@solana/web3.js": "^1.91.7",
88
85
  "arweave": "^1.15.1",
89
86
  "axios": "^1.9.0",
90
87
  "axios-retry": "^3.7.0",
91
88
  "bignumber.js": "^9.1.2",
92
- "bitcoinjs-lib": "^6.1.7",
93
89
  "bs58": "^5.0.0",
94
90
  "commander": "^12.1.0",
95
91
  "ethers": "^6.12.0",