@thru/sdk 0.2.22
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.abi.md +112 -0
- package/README.md +342 -0
- package/dist/abi/index.cjs +946 -0
- package/dist/abi/index.cjs.map +1 -0
- package/dist/abi/index.d.cts +331 -0
- package/dist/abi/index.d.ts +331 -0
- package/dist/abi/index.js +892 -0
- package/dist/abi/index.js.map +1 -0
- package/dist/abi/wasm/bundler/abi_reflect_wasm.d.ts +65 -0
- package/dist/abi/wasm/bundler/abi_reflect_wasm.js +5 -0
- package/dist/abi/wasm/bundler/abi_reflect_wasm_bg.js +412 -0
- package/dist/abi/wasm/bundler/abi_reflect_wasm_bg.wasm +0 -0
- package/dist/abi/wasm/bundler/abi_reflect_wasm_bg.wasm.d.ts +24 -0
- package/dist/abi/wasm/bundler/package.json +17 -0
- package/dist/abi/wasm/node/abi_reflect_wasm.d.ts +65 -0
- package/dist/abi/wasm/node/abi_reflect_wasm.js +425 -0
- package/dist/abi/wasm/node/abi_reflect_wasm_bg.wasm +0 -0
- package/dist/abi/wasm/node/abi_reflect_wasm_bg.wasm.d.ts +24 -0
- package/dist/abi/wasm/node/package.json +11 -0
- package/dist/abi/wasm/web/abi_reflect_wasm.d.ts +114 -0
- package/dist/abi/wasm/web/abi_reflect_wasm.js +499 -0
- package/dist/abi/wasm/web/abi_reflect_wasm_bg.wasm +0 -0
- package/dist/abi/wasm/web/abi_reflect_wasm_bg.wasm.d.ts +24 -0
- package/dist/abi/wasm/web/package.json +15 -0
- package/dist/chunk-CVBQ4UPL.js +3614 -0
- package/dist/chunk-CVBQ4UPL.js.map +1 -0
- package/dist/chunk-NSBPE2FW.js +15 -0
- package/dist/chunk-NSBPE2FW.js.map +1 -0
- package/dist/chunk-RL3Q6FDE.js +105 -0
- package/dist/chunk-RL3Q6FDE.js.map +1 -0
- package/dist/chunk-UDIXYJXC.js +260 -0
- package/dist/chunk-UDIXYJXC.js.map +1 -0
- package/dist/chunk-YQDWOMNO.js +271 -0
- package/dist/chunk-YQDWOMNO.js.map +1 -0
- package/dist/client-Cfi7zRLm.d.cts +1247 -0
- package/dist/client-worIo0a3.d.ts +1247 -0
- package/dist/client.cjs +3791 -0
- package/dist/client.cjs.map +1 -0
- package/dist/client.d.cts +7 -0
- package/dist/client.d.ts +7 -0
- package/dist/client.js +7 -0
- package/dist/client.js.map +1 -0
- package/dist/crypto/index.cjs +170 -0
- package/dist/crypto/index.cjs.map +1 -0
- package/dist/crypto/index.d.cts +60 -0
- package/dist/crypto/index.d.ts +60 -0
- package/dist/crypto/index.js +5 -0
- package/dist/crypto/index.js.map +1 -0
- package/dist/helpers/index.cjs +270 -0
- package/dist/helpers/index.cjs.map +1 -0
- package/dist/helpers/index.d.cts +15 -0
- package/dist/helpers/index.d.ts +15 -0
- package/dist/helpers/index.js +4 -0
- package/dist/helpers/index.js.map +1 -0
- package/dist/metafile-cjs.json +1 -0
- package/dist/metafile-esm.json +1 -0
- package/dist/proto/index.cjs +433 -0
- package/dist/proto/index.cjs.map +1 -0
- package/dist/proto/index.d.cts +435 -0
- package/dist/proto/index.d.ts +435 -0
- package/dist/proto/index.js +4 -0
- package/dist/proto/index.js.map +1 -0
- package/dist/sdk.cjs +4137 -0
- package/dist/sdk.cjs.map +1 -0
- package/dist/sdk.d.cts +36 -0
- package/dist/sdk.d.ts +36 -0
- package/dist/sdk.js +7 -0
- package/dist/sdk.js.map +1 -0
- package/dist/streaming_service_pb-DvCdJiCr.d.cts +4877 -0
- package/dist/streaming_service_pb-DvCdJiCr.d.ts +4877 -0
- package/dist/webcrypto-LTajLAad.d.cts +3 -0
- package/dist/webcrypto-LTajLAad.d.ts +3 -0
- package/package.json +88 -0
package/dist/sdk.d.cts
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { m as BuildTransactionParams, ah as Transaction, Z as SignedTransactionResult } from './client-Cfi7zRLm.cjs';
|
|
2
|
+
export { A as Account, a as AccountNonceObserver, b as AccountNonceObserverOptions, c as AccountQueryOptions, B as BatchSendAndTrackOptions, d as BatchSendAndTrackResult, e as BatchSendTransactionsOptions, f as BatchTrackStatus, g as Block, h as BlockList, i as BlockQueryOptions, j as BlockSelector, k as BuildAndSignTransactionOptions, l as BuildTransactionOptions, C as ChainEvent, n as CreateAccountOptions, D as DeriveAddressInput, o as DeriveAddressResult, p as DeriveProgramAddressOptions, q as DeriveProgramAddressResult, F as FeePayerNonceAllocation, r as FeePayerNonceManager, s as FeePayerNonceManagerOptions, t as Filter, u as FilterParamValue, G as GenerateStateProofOptions, v as GeneratedKeyPair, w as GetEventOptions, x as GetStateRootsOptions, H as HeightSnapshot, y as HeightSnapshotParams, I as InstructionContext, z as InstructionData, L as ListAccountsOptions, E as ListBlocksOptions, J as ListSlotMetricsOptions, K as ListTransactionsForAccountOptions, P as PageRequest, M as PageRequestParams, N as PageResponse, O as PageResponseParams, Q as Pubkey, R as PubkeyInput, S as RawAccountQueryOptions, T as RawBlockQueryOptions, U as RawTransactionQueryOptions, V as SendAndTrackTxnOptions, W as SendAndTrackTxnUpdate, X as Signature, Y as SignatureInput, _ as StateProof, $ as StreamAccountUpdate, a0 as StreamAccountUpdatesOptions, a1 as StreamAccountUpdatesResult, a2 as StreamBlocksOptions, a3 as StreamBlocksResult, a4 as StreamEventsOptions, a5 as StreamEventsResult, a6 as StreamNodeRecordsOptions, a7 as StreamNodeRecordsResult, a8 as StreamSlotMetricsOptions, a9 as StreamSlotMetricsResult, aa as StreamTransactionUpdate, ab as StreamTransactionsOptions, ac as StreamTransactionsResult, ad as Thru, ae as ThruClientConfig, af as TrackTransactionOptions, ag as TrackTransactionUpdate, ai as TransactionAccountsConfig, aj as TransactionExecutionEvent, ak as TransactionExecutionResultData, al as TransactionFeePayerConfig, am as TransactionHeaderConfig, an as TransactionList, ao as TransactionQueryOptions, ap as TransactionStatusSnapshot, aq as VersionContextInput, ar as VersionInfo, as as WaitForNonceOptions, at as accounts, au as blocks, av as chain, aw as collectStream, ax as consensus, ay as createThruClient, az as deriveAddress, aA as deriveProgramAddress, aB as events, aC as firstStreamValue, aD as forEachStreamValue, aE as height, aF as keys, aG as node, aH as nonce, aI as proofs, aJ as slots, aK as streaming, aL as transactions } from './client-Cfi7zRLm.cjs';
|
|
3
|
+
export { l as AccountView, E as BlockView, L as ConsensusStatus, V as ExecutionStatus, Z as FilterParamValueSchema, _ as FilterSchema, cr as SubmissionStatus, cJ as TransactionView, cL as TransactionVmError } from './streaming_service_pb-DvCdJiCr.cjs';
|
|
4
|
+
import '@connectrpc/connect';
|
|
5
|
+
import '@connectrpc/connect-web';
|
|
6
|
+
import '@bufbuild/protobuf/wkt';
|
|
7
|
+
import '@bufbuild/protobuf/codegenv2';
|
|
8
|
+
import '@bufbuild/protobuf';
|
|
9
|
+
|
|
10
|
+
declare class TransactionBuilder {
|
|
11
|
+
build(params: BuildTransactionParams): Transaction;
|
|
12
|
+
buildAndSign(params: BuildTransactionParams): Promise<SignedTransactionResult>;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Signature domain types matching the C implementation.
|
|
17
|
+
*/
|
|
18
|
+
declare enum SignatureDomain {
|
|
19
|
+
TXN = 0,/* Transaction */
|
|
20
|
+
BLOCK_HEADER = 1,/* Block header */
|
|
21
|
+
BLOCK = 2,/* Block */
|
|
22
|
+
GOSSIP = 3
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Domain-separated Ed25519 signing that matches the Rust/C implementation:
|
|
26
|
+
* r = H(domain || prefix || msg)
|
|
27
|
+
* k = H(domain || R || A || msg)
|
|
28
|
+
* S = (r + k * scalar) mod L
|
|
29
|
+
*/
|
|
30
|
+
declare function signWithDomain(message: Uint8Array, privateKey: Uint8Array, publicKey?: Uint8Array, domain?: SignatureDomain): Promise<Uint8Array>;
|
|
31
|
+
/**
|
|
32
|
+
* Domain-separated Ed25519 verification matching the Rust/C implementation.
|
|
33
|
+
*/
|
|
34
|
+
declare function verifyWithDomain(signature: Uint8Array, message: Uint8Array, publicKey: Uint8Array, domain?: SignatureDomain): Promise<boolean>;
|
|
35
|
+
|
|
36
|
+
export { SignatureDomain, SignedTransactionResult, Transaction, TransactionBuilder, signWithDomain, verifyWithDomain };
|
package/dist/sdk.d.ts
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { m as BuildTransactionParams, ah as Transaction, Z as SignedTransactionResult } from './client-worIo0a3.js';
|
|
2
|
+
export { A as Account, a as AccountNonceObserver, b as AccountNonceObserverOptions, c as AccountQueryOptions, B as BatchSendAndTrackOptions, d as BatchSendAndTrackResult, e as BatchSendTransactionsOptions, f as BatchTrackStatus, g as Block, h as BlockList, i as BlockQueryOptions, j as BlockSelector, k as BuildAndSignTransactionOptions, l as BuildTransactionOptions, C as ChainEvent, n as CreateAccountOptions, D as DeriveAddressInput, o as DeriveAddressResult, p as DeriveProgramAddressOptions, q as DeriveProgramAddressResult, F as FeePayerNonceAllocation, r as FeePayerNonceManager, s as FeePayerNonceManagerOptions, t as Filter, u as FilterParamValue, G as GenerateStateProofOptions, v as GeneratedKeyPair, w as GetEventOptions, x as GetStateRootsOptions, H as HeightSnapshot, y as HeightSnapshotParams, I as InstructionContext, z as InstructionData, L as ListAccountsOptions, E as ListBlocksOptions, J as ListSlotMetricsOptions, K as ListTransactionsForAccountOptions, P as PageRequest, M as PageRequestParams, N as PageResponse, O as PageResponseParams, Q as Pubkey, R as PubkeyInput, S as RawAccountQueryOptions, T as RawBlockQueryOptions, U as RawTransactionQueryOptions, V as SendAndTrackTxnOptions, W as SendAndTrackTxnUpdate, X as Signature, Y as SignatureInput, _ as StateProof, $ as StreamAccountUpdate, a0 as StreamAccountUpdatesOptions, a1 as StreamAccountUpdatesResult, a2 as StreamBlocksOptions, a3 as StreamBlocksResult, a4 as StreamEventsOptions, a5 as StreamEventsResult, a6 as StreamNodeRecordsOptions, a7 as StreamNodeRecordsResult, a8 as StreamSlotMetricsOptions, a9 as StreamSlotMetricsResult, aa as StreamTransactionUpdate, ab as StreamTransactionsOptions, ac as StreamTransactionsResult, ad as Thru, ae as ThruClientConfig, af as TrackTransactionOptions, ag as TrackTransactionUpdate, ai as TransactionAccountsConfig, aj as TransactionExecutionEvent, ak as TransactionExecutionResultData, al as TransactionFeePayerConfig, am as TransactionHeaderConfig, an as TransactionList, ao as TransactionQueryOptions, ap as TransactionStatusSnapshot, aq as VersionContextInput, ar as VersionInfo, as as WaitForNonceOptions, at as accounts, au as blocks, av as chain, aw as collectStream, ax as consensus, ay as createThruClient, az as deriveAddress, aA as deriveProgramAddress, aB as events, aC as firstStreamValue, aD as forEachStreamValue, aE as height, aF as keys, aG as node, aH as nonce, aI as proofs, aJ as slots, aK as streaming, aL as transactions } from './client-worIo0a3.js';
|
|
3
|
+
export { l as AccountView, E as BlockView, L as ConsensusStatus, V as ExecutionStatus, Z as FilterParamValueSchema, _ as FilterSchema, cr as SubmissionStatus, cJ as TransactionView, cL as TransactionVmError } from './streaming_service_pb-DvCdJiCr.js';
|
|
4
|
+
import '@connectrpc/connect';
|
|
5
|
+
import '@connectrpc/connect-web';
|
|
6
|
+
import '@bufbuild/protobuf/wkt';
|
|
7
|
+
import '@bufbuild/protobuf/codegenv2';
|
|
8
|
+
import '@bufbuild/protobuf';
|
|
9
|
+
|
|
10
|
+
declare class TransactionBuilder {
|
|
11
|
+
build(params: BuildTransactionParams): Transaction;
|
|
12
|
+
buildAndSign(params: BuildTransactionParams): Promise<SignedTransactionResult>;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Signature domain types matching the C implementation.
|
|
17
|
+
*/
|
|
18
|
+
declare enum SignatureDomain {
|
|
19
|
+
TXN = 0,/* Transaction */
|
|
20
|
+
BLOCK_HEADER = 1,/* Block header */
|
|
21
|
+
BLOCK = 2,/* Block */
|
|
22
|
+
GOSSIP = 3
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Domain-separated Ed25519 signing that matches the Rust/C implementation:
|
|
26
|
+
* r = H(domain || prefix || msg)
|
|
27
|
+
* k = H(domain || R || A || msg)
|
|
28
|
+
* S = (r + k * scalar) mod L
|
|
29
|
+
*/
|
|
30
|
+
declare function signWithDomain(message: Uint8Array, privateKey: Uint8Array, publicKey?: Uint8Array, domain?: SignatureDomain): Promise<Uint8Array>;
|
|
31
|
+
/**
|
|
32
|
+
* Domain-separated Ed25519 verification matching the Rust/C implementation.
|
|
33
|
+
*/
|
|
34
|
+
declare function verifyWithDomain(signature: Uint8Array, message: Uint8Array, publicKey: Uint8Array, domain?: SignatureDomain): Promise<boolean>;
|
|
35
|
+
|
|
36
|
+
export { SignatureDomain, SignedTransactionResult, Transaction, TransactionBuilder, signWithDomain, verifyWithDomain };
|
package/dist/sdk.js
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export { Account, AccountNonceObserver, Block, ChainEvent, FeePayerNonceManager, Filter, FilterParamValue, HeightSnapshot, PageRequest, PageResponse, Pubkey, Signature, SignatureDomain, StateProof, Transaction, TransactionBuilder, TransactionStatusSnapshot, VersionInfo, accounts_exports as accounts, blocks_exports as blocks, chain_exports as chain, collectStream, consensus_exports as consensus, createThruClient, deriveAddress, deriveProgramAddress, events_exports as events, firstStreamValue, forEachStreamValue, height_exports as height, keys_exports as keys, node_exports as node, nonce_exports as nonce, proofs_exports as proofs, signWithDomain, slots_exports as slots, streaming_exports as streaming, transactions_exports as transactions, verifyWithDomain } from './chunk-CVBQ4UPL.js';
|
|
2
|
+
export { AccountView, BlockView, ConsensusStatus, ExecutionStatus, FilterParamValueSchema, FilterSchema, SubmissionStatus, TransactionView, TransactionVmError } from './chunk-YQDWOMNO.js';
|
|
3
|
+
import './chunk-RL3Q6FDE.js';
|
|
4
|
+
import './chunk-UDIXYJXC.js';
|
|
5
|
+
import './chunk-NSBPE2FW.js';
|
|
6
|
+
//# sourceMappingURL=sdk.js.map
|
|
7
|
+
//# sourceMappingURL=sdk.js.map
|
package/dist/sdk.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"sdk.js"}
|