@thru/thru-sdk 0.1.15 → 0.1.19
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 +77 -0
- package/dist/{chunk-FDZQR6ZZ.js → chunk-PH7P5EEU.js} +168 -65
- package/dist/chunk-PH7P5EEU.js.map +1 -0
- package/dist/client.d.ts +16 -3
- package/dist/client.js +19 -3
- package/dist/client.js.map +1 -1
- package/dist/metafile-esm.json +1 -1
- package/dist/sdk.d.ts +4 -3
- package/dist/sdk.js +1 -1
- package/dist/{transactions-X2KKrGw6.d.ts → transactions-BzD9hYlc.d.ts} +552 -88
- package/package.json +11 -4
- package/thru-ts-client-sdk/__tests__/helpers/test-utils.ts +228 -0
- package/thru-ts-client-sdk/core/__tests__/bound-client.test.ts +354 -0
- package/thru-ts-client-sdk/core/__tests__/client.test.ts +53 -0
- package/thru-ts-client-sdk/core/bound-client.ts +23 -2
- package/thru-ts-client-sdk/defaults.ts +10 -1
- package/thru-ts-client-sdk/modules/__tests__/accounts.test.ts +406 -0
- package/thru-ts-client-sdk/modules/__tests__/blocks.test.ts +199 -0
- package/thru-ts-client-sdk/modules/__tests__/events.test.ts +74 -0
- package/thru-ts-client-sdk/modules/__tests__/height.test.ts +39 -0
- package/thru-ts-client-sdk/modules/__tests__/helpers.test.ts +288 -0
- package/thru-ts-client-sdk/modules/__tests__/keys.test.ts +55 -0
- package/thru-ts-client-sdk/modules/__tests__/proofs.test.ts +119 -0
- package/thru-ts-client-sdk/modules/__tests__/streaming.test.ts +152 -0
- package/thru-ts-client-sdk/modules/__tests__/transactions.test.ts +730 -0
- package/thru-ts-client-sdk/modules/__tests__/version.test.ts +40 -0
- package/thru-ts-client-sdk/modules/accounts.ts +14 -18
- package/thru-ts-client-sdk/modules/streaming.ts +102 -3
- package/thru-ts-client-sdk/modules/transactions.ts +136 -36
- package/thru-ts-client-sdk/modules/version.ts +10 -0
- package/thru-ts-client-sdk/proto/thru/common/v1/consensus_pb.ts +2 -3
- package/thru-ts-client-sdk/proto/thru/common/v1/errors_pb.ts +7 -8
- package/thru-ts-client-sdk/proto/thru/common/v1/filters_pb.ts +58 -10
- package/thru-ts-client-sdk/proto/thru/common/v1/pagination_pb.ts +12 -13
- package/thru-ts-client-sdk/proto/thru/core/v1/account_pb.ts +27 -26
- package/thru-ts-client-sdk/proto/thru/core/v1/block_pb.ts +7 -8
- package/thru-ts-client-sdk/proto/thru/core/v1/state_pb.ts +4 -5
- package/thru-ts-client-sdk/proto/thru/core/v1/transaction_pb.ts +213 -12
- package/thru-ts-client-sdk/proto/thru/core/v1/types_pb.ts +2 -3
- package/thru-ts-client-sdk/proto/thru/services/v1/command_service_pb.ts +68 -3
- package/thru-ts-client-sdk/proto/thru/services/v1/query_service_pb.ts +84 -78
- package/thru-ts-client-sdk/proto/thru/services/v1/streaming_service_pb.ts +24 -25
- package/thru-ts-client-sdk/sdk.ts +5 -3
- package/thru-ts-client-sdk/test-scripts/counter.ts +353 -100
- package/thru-ts-client-sdk/transactions/Transaction.ts +10 -10
- package/thru-ts-client-sdk/transactions/TransactionBuilder.ts +12 -7
- package/thru-ts-client-sdk/transactions/__tests__/TransactionBuilder.test.ts +411 -0
- package/thru-ts-client-sdk/transactions/__tests__/utils.test.ts +214 -0
- package/thru-ts-client-sdk/transactions/types.ts +14 -4
- package/vitest.config.ts +31 -0
- package/dist/chunk-FDZQR6ZZ.js.map +0 -1
- package/thru-ts-client-sdk/transactions/__tests__/transaction.test.ts +0 -95
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
// @generated by protoc-gen-es v2.9.0 with parameter "target=ts"
|
|
2
|
-
// @generated from file thru/core/v1/transaction.proto (package thru.core.v1,
|
|
3
|
-
// option features.field_presence = EXPLICIT;
|
|
2
|
+
// @generated from file thru/core/v1/transaction.proto (package thru.core.v1, syntax proto3)
|
|
4
3
|
/* eslint-disable */
|
|
5
4
|
|
|
6
5
|
import type { GenEnum, GenFile, GenMessage } from "@bufbuild/protobuf/codegenv2";
|
|
@@ -15,7 +14,7 @@ import type { Message } from "@bufbuild/protobuf";
|
|
|
15
14
|
* Describes the file thru/core/v1/transaction.proto.
|
|
16
15
|
*/
|
|
17
16
|
export const file_thru_core_v1_transaction: GenFile = /*@__PURE__*/
|
|
18
|
-
fileDesc("Ch50aHJ1L2NvcmUvdjEvdHJhbnNhY3Rpb24ucHJvdG8SDHRocnUuY29yZS52MSKaBAoRVHJhbnNhY3Rpb25IZWFkZXISOQoTZmVlX3BheWVyX3NpZ25hdHVyZRgBIAEoCzIXLnRocnUuY29yZS52MS5TaWduYXR1cmVCA+BBAhIUCgd2ZXJzaW9uGAIgASgNQgPgQQISEgoFZmxhZ3MYAyABKA1CA+
|
|
17
|
+
fileDesc("Ch50aHJ1L2NvcmUvdjEvdHJhbnNhY3Rpb24ucHJvdG8SDHRocnUuY29yZS52MSKaBAoRVHJhbnNhY3Rpb25IZWFkZXISOQoTZmVlX3BheWVyX3NpZ25hdHVyZRgBIAEoCzIXLnRocnUuY29yZS52MS5TaWduYXR1cmVCA+BBAhIUCgd2ZXJzaW9uGAIgASgNQgPgQQISEgoFZmxhZ3MYAyABKA1CA+BBAhIlChhyZWFkd3JpdGVfYWNjb3VudHNfY291bnQYBCABKA1CA+BBAhIkChdyZWFkb25seV9hY2NvdW50c19jb3VudBgFIAEoDUID4EECEiIKFWluc3RydWN0aW9uX2RhdGFfc2l6ZRgGIAEoDUID4EECEiQKF3JlcXVlc3RlZF9jb21wdXRlX3VuaXRzGAcgASgNQgPgQQISIgoVcmVxdWVzdGVkX3N0YXRlX3VuaXRzGAggASgNQgPgQQISIwoWcmVxdWVzdGVkX21lbW9yeV91bml0cxgJIAEoDUID4EECEhkKDGV4cGlyeV9hZnRlchgKIAEoDUID4EECEhAKA2ZlZRgLIAEoBEID4EECEhIKBW5vbmNlGAwgASgEQgPgQQISFwoKc3RhcnRfc2xvdBgNIAEoBEID4EECEjMKEGZlZV9wYXllcl9wdWJrZXkYDiABKAsyFC50aH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0VSUk9SX0RVUExJQ0FURV9BQ0NPVU5UEIX+/////////wESMwomVFJBTlNBQ1RJT05fVk1fRVJST1JfVU5TT1JURURfQUNDT1VOVFMQhv7/////////ARI9CjBUUkFOU0FDVElPTl9WTV9FUlJPUl9VTlNPUlRFRF9SRUFEV1JJVEVfQUNDT1VOVFMQh/7/////////ARI8Ci9UUkFOU0FDVElPTl9WTV9FUlJPUl9VTlNPUlRFRF9SRUFET05MWV9BQ0NPVU5UUxCI/v////////8BEj4KMVRSQU5TQUNUSU9OX1ZNX0VSUk9SX0FDQ09VTlRfQ09VTlRfTElNSVRfRVhDRUVERUQQif7/////////ARIvCiJUUkFOU0FDVElPTl9WTV9FUlJPUl9OT05DRV9UT09fTE9XEIH8/////////wESMAojVFJBTlNBQ1RJT05fVk1fRVJST1JfTk9OQ0VfVE9PX0hJR0gQgvz/////////ARJACjNUUkFOU0FDVElPTl9WTV9FUlJPUl9JTlNVRkZJQ0lFTlRfRkVFX1BBWUVSX0JBTEFOQ0UQg/z/////////ARJCCjVUUkFOU0FDVElPTl9WTV9FUlJPUl9GRUVfUEFZRVJfQUNDT1VOVF9ET0VTX05PVF9FWElTVBCE/P////////8BEi4KIVRSQU5TQUNUSU9OX1ZNX0VSUk9SX05PVF9MSVZFX1lFVBCF/P////////8BEikKHFRSQU5TQUNUSU9OX1ZNX0VSUk9SX0VYUElSRUQQhvz/////////ARI/CjJUUkFOU0FDVElPTl9WTV9FUlJPUl9JTlZBTElEX0ZFRV9QQVlFUl9TVEFURV9QUk9PRhCH/P////////8BEkQKN1RSQU5TQUNUSU9OX1ZNX0VSUk9SX0lOVkFMSURfRkVFX1BBWUVSX1NUQVRFX1BST09GX1RZUEUQiPz/////////ARJECjdUUkFOU0FDVElPTl9WTV9FUlJPUl9JTlZBTElEX0ZFRV9QQVlFUl9TVEFURV9QUk9PRl9TTE9UEIn8/////////wESQQo0VFJBTlNBQ1RJT05fVk1fRVJST1JfSU5WQUxJRF9GRUVfUEFZRVJfQUNDT1VOVF9PV05FUhCK/P////////8BEk0KQFRSQU5TQUNUSU9OX1ZNX0VSUk9SX0lOVkFMSURfRkVFX1BBWUVSX1NUQVRFX1BST09GX0FDQ09VTlRfT1dORVIQi/z/////////ARJUCkdUUkFOU0FDVElPTl9WTV9FUlJPUl9JTlZBTElEX0ZFRV9QQVlFUl9TVEFURV9QUk9PRl9BQ0NPVU5UX01FVEFfREFUQV9TWhCM/P////////8BEisKHlRSQU5TQUNUSU9OX1ZNX0VSUk9SX1ZNX0ZBSUxFRBCB+v////////8BEjkKLFRSQU5TQUNUSU9OX1ZNX0VSUk9SX0lOVkFMSURfUFJPR1JBTV9BQ0NPVU5UEIL6/////////wESKwoeVFJBTlNBQ1RJT05fVk1fRVJST1JfVk1fUkVWRVJUEIP6/////////wESLgohVFJBTlNBQ1RJT05fVk1fRVJST1JfQ1VfRVhIQVVTVEVEEIT6/////////wESLgohVFJBTlNBQ1RJT05fVk1fRVJST1JfU1VfRVhIQVVTVEVEEIX6/////////wFCvwEKEGNvbS50aHJ1LmNvcmUudjFCEFRyYW5zYWN0aW9uUHJvdG9QAVpAZ2l0aHViLmNvbS9VbnRvLUxhYnMvdGhydS1uZXQvZ3JwYy9wa2cvcHJvdG8vdGhydS9jb3JlL3YxO2NvcmV2MaICA1RDWKoCDFRocnUuQ29yZS5WMboCBFRIVUPKAgxUaHJ1XENvcmVcVjHiAhhUaHJ1XENvcmVcVjFcR1BCTWV0YWRhdGHqAg5UaHJ1OjpDb3JlOjpWMWIGcHJvdG8z", [file_buf_validate_validate, file_google_api_field_behavior, file_thru_core_v1_types]);
|
|
19
18
|
|
|
20
19
|
/**
|
|
21
20
|
* TransactionHeader carries structured metadata for a transaction.
|
|
@@ -133,9 +132,9 @@ export type TransactionExecutionResult = Message<"thru.core.v1.TransactionExecut
|
|
|
133
132
|
userErrorCode: bigint;
|
|
134
133
|
|
|
135
134
|
/**
|
|
136
|
-
* @generated from field:
|
|
135
|
+
* @generated from field: thru.core.v1.TransactionVmError vm_error = 5;
|
|
137
136
|
*/
|
|
138
|
-
vmError:
|
|
137
|
+
vmError: TransactionVmError;
|
|
139
138
|
|
|
140
139
|
/**
|
|
141
140
|
* @generated from field: uint64 execution_result = 6;
|
|
@@ -236,24 +235,24 @@ export type Transaction = Message<"thru.core.v1.Transaction"> & {
|
|
|
236
235
|
header?: TransactionHeader;
|
|
237
236
|
|
|
238
237
|
/**
|
|
239
|
-
* @generated from field: bytes body = 3;
|
|
238
|
+
* @generated from field: optional bytes body = 3;
|
|
240
239
|
*/
|
|
241
|
-
body
|
|
240
|
+
body?: Uint8Array;
|
|
242
241
|
|
|
243
242
|
/**
|
|
244
|
-
* @generated from field: thru.core.v1.TransactionExecutionResult execution_result = 4;
|
|
243
|
+
* @generated from field: optional thru.core.v1.TransactionExecutionResult execution_result = 4;
|
|
245
244
|
*/
|
|
246
245
|
executionResult?: TransactionExecutionResult;
|
|
247
246
|
|
|
248
247
|
/**
|
|
249
|
-
* @generated from field: uint64 slot = 5;
|
|
248
|
+
* @generated from field: optional uint64 slot = 5;
|
|
250
249
|
*/
|
|
251
|
-
slot
|
|
250
|
+
slot?: bigint;
|
|
252
251
|
|
|
253
252
|
/**
|
|
254
|
-
* @generated from field: uint32 block_offset = 6;
|
|
253
|
+
* @generated from field: optional uint32 block_offset = 6;
|
|
255
254
|
*/
|
|
256
|
-
blockOffset
|
|
255
|
+
blockOffset?: number;
|
|
257
256
|
};
|
|
258
257
|
|
|
259
258
|
/**
|
|
@@ -325,3 +324,205 @@ export enum TransactionView {
|
|
|
325
324
|
export const TransactionViewSchema: GenEnum<TransactionView> = /*@__PURE__*/
|
|
326
325
|
enumDesc(file_thru_core_v1_transaction, 0);
|
|
327
326
|
|
|
327
|
+
/**
|
|
328
|
+
* TransactionVmError enumerates runtime error codes returned by the executor.
|
|
329
|
+
*
|
|
330
|
+
* @generated from enum thru.core.v1.TransactionVmError
|
|
331
|
+
*/
|
|
332
|
+
export enum TransactionVmError {
|
|
333
|
+
/**
|
|
334
|
+
* TN_RUNTIME_TXN_EXECUTE_SUCCESS
|
|
335
|
+
*
|
|
336
|
+
* @generated from enum value: TRANSACTION_VM_EXECUTE_SUCCESS = 0;
|
|
337
|
+
*/
|
|
338
|
+
TRANSACTION_VM_EXECUTE_SUCCESS = 0,
|
|
339
|
+
|
|
340
|
+
/**
|
|
341
|
+
* TN_RUNTIME_TXN_ERR_INVALID_FORMAT
|
|
342
|
+
*
|
|
343
|
+
* @generated from enum value: TRANSACTION_VM_ERROR_INVALID_FORMAT = -255;
|
|
344
|
+
*/
|
|
345
|
+
TRANSACTION_VM_ERROR_INVALID_FORMAT = -255,
|
|
346
|
+
|
|
347
|
+
/**
|
|
348
|
+
* TN_RUNTIME_TXN_ERR_INVALID_VERSION
|
|
349
|
+
*
|
|
350
|
+
* @generated from enum value: TRANSACTION_VM_ERROR_INVALID_VERSION = -254;
|
|
351
|
+
*/
|
|
352
|
+
TRANSACTION_VM_ERROR_INVALID_VERSION = -254,
|
|
353
|
+
|
|
354
|
+
/**
|
|
355
|
+
* TN_RUNTIME_TXN_ERR_INVALID_FLAGS
|
|
356
|
+
*
|
|
357
|
+
* @generated from enum value: TRANSACTION_VM_ERROR_INVALID_FLAGS = -253;
|
|
358
|
+
*/
|
|
359
|
+
TRANSACTION_VM_ERROR_INVALID_FLAGS = -253,
|
|
360
|
+
|
|
361
|
+
/**
|
|
362
|
+
* TN_RUNTIME_TXN_ERR_INVALID_SIGNATURE
|
|
363
|
+
*
|
|
364
|
+
* @generated from enum value: TRANSACTION_VM_ERROR_INVALID_SIGNATURE = -252;
|
|
365
|
+
*/
|
|
366
|
+
TRANSACTION_VM_ERROR_INVALID_SIGNATURE = -252,
|
|
367
|
+
|
|
368
|
+
/**
|
|
369
|
+
* TN_RUNTIME_TXN_ERR_DUPLICATE_ACCOUNT
|
|
370
|
+
*
|
|
371
|
+
* @generated from enum value: TRANSACTION_VM_ERROR_DUPLICATE_ACCOUNT = -251;
|
|
372
|
+
*/
|
|
373
|
+
TRANSACTION_VM_ERROR_DUPLICATE_ACCOUNT = -251,
|
|
374
|
+
|
|
375
|
+
/**
|
|
376
|
+
* TN_RUNTIME_TXN_ERR_UNSORTED_ACCOUNTS
|
|
377
|
+
*
|
|
378
|
+
* @generated from enum value: TRANSACTION_VM_ERROR_UNSORTED_ACCOUNTS = -250;
|
|
379
|
+
*/
|
|
380
|
+
TRANSACTION_VM_ERROR_UNSORTED_ACCOUNTS = -250,
|
|
381
|
+
|
|
382
|
+
/**
|
|
383
|
+
* TN_RUNTIME_TXN_ERR_UNSORTED_READWRITE_ACCOUNTS
|
|
384
|
+
*
|
|
385
|
+
* @generated from enum value: TRANSACTION_VM_ERROR_UNSORTED_READWRITE_ACCOUNTS = -249;
|
|
386
|
+
*/
|
|
387
|
+
TRANSACTION_VM_ERROR_UNSORTED_READWRITE_ACCOUNTS = -249,
|
|
388
|
+
|
|
389
|
+
/**
|
|
390
|
+
* TN_RUNTIME_TXN_ERR_UNSORTED_READONLY_ACCOUNTS
|
|
391
|
+
*
|
|
392
|
+
* @generated from enum value: TRANSACTION_VM_ERROR_UNSORTED_READONLY_ACCOUNTS = -248;
|
|
393
|
+
*/
|
|
394
|
+
TRANSACTION_VM_ERROR_UNSORTED_READONLY_ACCOUNTS = -248,
|
|
395
|
+
|
|
396
|
+
/**
|
|
397
|
+
* TN_RUNTIME_TXN_ERR_ACCOUNT_COUNT_LIMIT_EXCEEDED
|
|
398
|
+
*
|
|
399
|
+
* @generated from enum value: TRANSACTION_VM_ERROR_ACCOUNT_COUNT_LIMIT_EXCEEDED = -247;
|
|
400
|
+
*/
|
|
401
|
+
TRANSACTION_VM_ERROR_ACCOUNT_COUNT_LIMIT_EXCEEDED = -247,
|
|
402
|
+
|
|
403
|
+
/**
|
|
404
|
+
* TN_RUNTIME_TXN_ERR_NONCE_TOO_LOW
|
|
405
|
+
*
|
|
406
|
+
* @generated from enum value: TRANSACTION_VM_ERROR_NONCE_TOO_LOW = -511;
|
|
407
|
+
*/
|
|
408
|
+
TRANSACTION_VM_ERROR_NONCE_TOO_LOW = -511,
|
|
409
|
+
|
|
410
|
+
/**
|
|
411
|
+
* TN_RUNTIME_TXN_ERR_NONCE_TOO_HIGH
|
|
412
|
+
*
|
|
413
|
+
* @generated from enum value: TRANSACTION_VM_ERROR_NONCE_TOO_HIGH = -510;
|
|
414
|
+
*/
|
|
415
|
+
TRANSACTION_VM_ERROR_NONCE_TOO_HIGH = -510,
|
|
416
|
+
|
|
417
|
+
/**
|
|
418
|
+
* TN_RUNTIME_TXN_ERR_INSUFFICIENT_FEE_PAYER_BALANCE
|
|
419
|
+
*
|
|
420
|
+
* @generated from enum value: TRANSACTION_VM_ERROR_INSUFFICIENT_FEE_PAYER_BALANCE = -509;
|
|
421
|
+
*/
|
|
422
|
+
TRANSACTION_VM_ERROR_INSUFFICIENT_FEE_PAYER_BALANCE = -509,
|
|
423
|
+
|
|
424
|
+
/**
|
|
425
|
+
* TN_RUNTIME_TXN_ERR_FEE_PAYER_ACCOUNT_DOES_NOT_EXIST
|
|
426
|
+
*
|
|
427
|
+
* @generated from enum value: TRANSACTION_VM_ERROR_FEE_PAYER_ACCOUNT_DOES_NOT_EXIST = -508;
|
|
428
|
+
*/
|
|
429
|
+
TRANSACTION_VM_ERROR_FEE_PAYER_ACCOUNT_DOES_NOT_EXIST = -508,
|
|
430
|
+
|
|
431
|
+
/**
|
|
432
|
+
* TN_RUNTIME_TXN_ERR_NOT_LIVE_YET
|
|
433
|
+
*
|
|
434
|
+
* @generated from enum value: TRANSACTION_VM_ERROR_NOT_LIVE_YET = -507;
|
|
435
|
+
*/
|
|
436
|
+
TRANSACTION_VM_ERROR_NOT_LIVE_YET = -507,
|
|
437
|
+
|
|
438
|
+
/**
|
|
439
|
+
* TN_RUNTIME_TXN_ERR_EXPIRED
|
|
440
|
+
*
|
|
441
|
+
* @generated from enum value: TRANSACTION_VM_ERROR_EXPIRED = -506;
|
|
442
|
+
*/
|
|
443
|
+
TRANSACTION_VM_ERROR_EXPIRED = -506,
|
|
444
|
+
|
|
445
|
+
/**
|
|
446
|
+
* TN_RUNTIME_TXN_ERR_INVALID_FEE_PAYER_STATE_PROOF
|
|
447
|
+
*
|
|
448
|
+
* @generated from enum value: TRANSACTION_VM_ERROR_INVALID_FEE_PAYER_STATE_PROOF = -505;
|
|
449
|
+
*/
|
|
450
|
+
TRANSACTION_VM_ERROR_INVALID_FEE_PAYER_STATE_PROOF = -505,
|
|
451
|
+
|
|
452
|
+
/**
|
|
453
|
+
* TN_RUNTIME_TXN_ERR_INVALID_FEE_PAYER_STATE_PROOF_TYPE
|
|
454
|
+
*
|
|
455
|
+
* @generated from enum value: TRANSACTION_VM_ERROR_INVALID_FEE_PAYER_STATE_PROOF_TYPE = -504;
|
|
456
|
+
*/
|
|
457
|
+
TRANSACTION_VM_ERROR_INVALID_FEE_PAYER_STATE_PROOF_TYPE = -504,
|
|
458
|
+
|
|
459
|
+
/**
|
|
460
|
+
* TN_RUNTIME_TXN_ERR_INVALID_FEE_PAYER_STATE_PROOF_SLOT
|
|
461
|
+
*
|
|
462
|
+
* @generated from enum value: TRANSACTION_VM_ERROR_INVALID_FEE_PAYER_STATE_PROOF_SLOT = -503;
|
|
463
|
+
*/
|
|
464
|
+
TRANSACTION_VM_ERROR_INVALID_FEE_PAYER_STATE_PROOF_SLOT = -503,
|
|
465
|
+
|
|
466
|
+
/**
|
|
467
|
+
* TN_RUNTIME_TXN_ERR_INVALID_FEE_PAYER_ACCOUNT_OWNER
|
|
468
|
+
*
|
|
469
|
+
* @generated from enum value: TRANSACTION_VM_ERROR_INVALID_FEE_PAYER_ACCOUNT_OWNER = -502;
|
|
470
|
+
*/
|
|
471
|
+
TRANSACTION_VM_ERROR_INVALID_FEE_PAYER_ACCOUNT_OWNER = -502,
|
|
472
|
+
|
|
473
|
+
/**
|
|
474
|
+
* TN_RUNTIME_TXN_ERR_INVALID_FEE_PAYER_STATE_PROOF_ACCOUNT_OWNER
|
|
475
|
+
*
|
|
476
|
+
* @generated from enum value: TRANSACTION_VM_ERROR_INVALID_FEE_PAYER_STATE_PROOF_ACCOUNT_OWNER = -501;
|
|
477
|
+
*/
|
|
478
|
+
TRANSACTION_VM_ERROR_INVALID_FEE_PAYER_STATE_PROOF_ACCOUNT_OWNER = -501,
|
|
479
|
+
|
|
480
|
+
/**
|
|
481
|
+
* TN_RUNTIME_TXN_ERR_INVALID_FEE_PAYER_STATE_PROOF_ACCOUNT_META_DATA_SZ
|
|
482
|
+
*
|
|
483
|
+
* @generated from enum value: TRANSACTION_VM_ERROR_INVALID_FEE_PAYER_STATE_PROOF_ACCOUNT_META_DATA_SZ = -500;
|
|
484
|
+
*/
|
|
485
|
+
TRANSACTION_VM_ERROR_INVALID_FEE_PAYER_STATE_PROOF_ACCOUNT_META_DATA_SZ = -500,
|
|
486
|
+
|
|
487
|
+
/**
|
|
488
|
+
* TN_RUNTIME_TXN_ERR_VM_FAILED
|
|
489
|
+
*
|
|
490
|
+
* @generated from enum value: TRANSACTION_VM_ERROR_VM_FAILED = -767;
|
|
491
|
+
*/
|
|
492
|
+
TRANSACTION_VM_ERROR_VM_FAILED = -767,
|
|
493
|
+
|
|
494
|
+
/**
|
|
495
|
+
* TN_RUNTIME_TXN_ERR_INVALID_PROGRAM_ACCOUNT
|
|
496
|
+
*
|
|
497
|
+
* @generated from enum value: TRANSACTION_VM_ERROR_INVALID_PROGRAM_ACCOUNT = -766;
|
|
498
|
+
*/
|
|
499
|
+
TRANSACTION_VM_ERROR_INVALID_PROGRAM_ACCOUNT = -766,
|
|
500
|
+
|
|
501
|
+
/**
|
|
502
|
+
* TN_RUNTIME_TXN_ERR_VM_REVERT
|
|
503
|
+
*
|
|
504
|
+
* @generated from enum value: TRANSACTION_VM_ERROR_VM_REVERT = -765;
|
|
505
|
+
*/
|
|
506
|
+
TRANSACTION_VM_ERROR_VM_REVERT = -765,
|
|
507
|
+
|
|
508
|
+
/**
|
|
509
|
+
* TN_RUNTIME_TXN_ERR_CU_EXHAUSTED
|
|
510
|
+
*
|
|
511
|
+
* @generated from enum value: TRANSACTION_VM_ERROR_CU_EXHAUSTED = -764;
|
|
512
|
+
*/
|
|
513
|
+
TRANSACTION_VM_ERROR_CU_EXHAUSTED = -764,
|
|
514
|
+
|
|
515
|
+
/**
|
|
516
|
+
* TN_RUNTIME_TXN_ERR_SU_EXHAUSTED
|
|
517
|
+
*
|
|
518
|
+
* @generated from enum value: TRANSACTION_VM_ERROR_SU_EXHAUSTED = -763;
|
|
519
|
+
*/
|
|
520
|
+
TRANSACTION_VM_ERROR_SU_EXHAUSTED = -763,
|
|
521
|
+
}
|
|
522
|
+
|
|
523
|
+
/**
|
|
524
|
+
* Describes the enum thru.core.v1.TransactionVmError.
|
|
525
|
+
*/
|
|
526
|
+
export const TransactionVmErrorSchema: GenEnum<TransactionVmError> = /*@__PURE__*/
|
|
527
|
+
enumDesc(file_thru_core_v1_transaction, 1);
|
|
528
|
+
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
// @generated by protoc-gen-es v2.9.0 with parameter "target=ts"
|
|
2
|
-
// @generated from file thru/core/v1/types.proto (package thru.core.v1,
|
|
3
|
-
// option features.field_presence = EXPLICIT;
|
|
2
|
+
// @generated from file thru/core/v1/types.proto (package thru.core.v1, syntax proto3)
|
|
4
3
|
/* eslint-disable */
|
|
5
4
|
|
|
6
5
|
import type { GenFile, GenMessage } from "@bufbuild/protobuf/codegenv2";
|
|
@@ -13,7 +12,7 @@ import type { Message } from "@bufbuild/protobuf";
|
|
|
13
12
|
* Describes the file thru/core/v1/types.proto.
|
|
14
13
|
*/
|
|
15
14
|
export const file_thru_core_v1_types: GenFile = /*@__PURE__*/
|
|
16
|
-
fileDesc("
|
|
15
|
+
fileDesc("Chh0aHJ1L2NvcmUvdjEvdHlwZXMucHJvdG8SDHRocnUuY29yZS52MSIjCgZQdWJrZXkSGQoFdmFsdWUYASABKAxCCuBBArpIBHoCaCAiIQoESGFzaBIZCgV2YWx1ZRgBIAEoDEIK4EECukgEegJoICImCglCbG9ja0hhc2gSGQoFdmFsdWUYASABKAxCCuBBArpIBHoCaEAiJgoJU2lnbmF0dXJlEhkKBXZhbHVlGAEgASgMQgrgQQK6SAR6AmhAQrkBChBjb20udGhydS5jb3JlLnYxQgpUeXBlc1Byb3RvUAFaQGdpdGh1Yi5jb20vVW50by1MYWJzL3RocnUtbmV0L2dycGMvcGtnL3Byb3RvL3RocnUvY29yZS92MTtjb3JldjGiAgNUQ1iqAgxUaHJ1LkNvcmUuVjG6AgRUSFVDygIMVGhydVxDb3JlXFYx4gIYVGhydVxDb3JlXFYxXEdQQk1ldGFkYXRh6gIOVGhydTo6Q29yZTo6VjFiBnByb3RvMw", [file_buf_validate_validate, file_google_api_field_behavior]);
|
|
17
16
|
|
|
18
17
|
/**
|
|
19
18
|
* Pubkey represents a 32-byte public key value.
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
// @generated by protoc-gen-es v2.9.0 with parameter "target=ts"
|
|
2
|
-
// @generated from file thru/services/v1/command_service.proto (package thru.services.v1,
|
|
3
|
-
// option features.field_presence = EXPLICIT;
|
|
2
|
+
// @generated from file thru/services/v1/command_service.proto (package thru.services.v1, syntax proto3)
|
|
4
3
|
/* eslint-disable */
|
|
5
4
|
|
|
6
5
|
import type { GenFile, GenMessage, GenService } from "@bufbuild/protobuf/codegenv2";
|
|
@@ -17,7 +16,7 @@ import type { Message } from "@bufbuild/protobuf";
|
|
|
17
16
|
* Describes the file thru/services/v1/command_service.proto.
|
|
18
17
|
*/
|
|
19
18
|
export const file_thru_services_v1_command_service: GenFile = /*@__PURE__*/
|
|
20
|
-
fileDesc("CiZ0aHJ1L3NlcnZpY2VzL3YxL2NvbW1hbmRfc2VydmljZS5wcm90bxIQdGhydS5zZXJ2aWNlcy52MSI2ChZTZW5kVHJhbnNhY3Rpb25SZXF1ZXN0EhwKD3Jhd190cmFuc2FjdGlvbhgBIAEoDEID4EECIkoKF1NlbmRUcmFuc2FjdGlvblJlc3BvbnNlEi8KCXNpZ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aWNlUHJvdG9QAVpIZ2l0aHViLmNvbS9VbnRvLUxhYnMvdGhydS1uZXQvZ3JwYy9wa2cvcHJvdG8vdGhydS9zZXJ2aWNlcy92MTtzZXJ2aWNlc3YxogIDVFNYqgIQVGhydS5TZXJ2aWNlcy5WMboCBFRIVVPKAhBUaHJ1XFNlcnZpY2VzXFYx4gIcVGhydVxTZXJ2aWNlc1xWMVxHUEJNZXRhZGF0YeoCElRocnU6OlNlcnZpY2VzOjpWMWIGcHJvdG8z", [file_google_api_annotations, file_google_api_client, file_google_api_field_behavior, file_thru_core_v1_transaction, file_thru_core_v1_types]);
|
|
21
20
|
|
|
22
21
|
/**
|
|
23
22
|
* SendTransactionRequest submits a transaction to the cluster.
|
|
@@ -59,6 +58,62 @@ export type SendTransactionResponse = Message<"thru.services.v1.SendTransactionR
|
|
|
59
58
|
export const SendTransactionResponseSchema: GenMessage<SendTransactionResponse> = /*@__PURE__*/
|
|
60
59
|
messageDesc(file_thru_services_v1_command_service, 1);
|
|
61
60
|
|
|
61
|
+
/**
|
|
62
|
+
* BatchSendTransactionsRequest submits multiple transactions to the cluster.
|
|
63
|
+
*
|
|
64
|
+
* @generated from message thru.services.v1.BatchSendTransactionsRequest
|
|
65
|
+
*/
|
|
66
|
+
export type BatchSendTransactionsRequest = Message<"thru.services.v1.BatchSendTransactionsRequest"> & {
|
|
67
|
+
/**
|
|
68
|
+
* List of raw transaction bytes encoded according to chain specification.
|
|
69
|
+
*
|
|
70
|
+
* @generated from field: repeated bytes raw_transactions = 1;
|
|
71
|
+
*/
|
|
72
|
+
rawTransactions: Uint8Array[];
|
|
73
|
+
|
|
74
|
+
/**
|
|
75
|
+
* Number of retries for each transaction if not accepted by UDS (defaults to 0).
|
|
76
|
+
*
|
|
77
|
+
* @generated from field: int32 num_retries = 2;
|
|
78
|
+
*/
|
|
79
|
+
numRetries: number;
|
|
80
|
+
};
|
|
81
|
+
|
|
82
|
+
/**
|
|
83
|
+
* Describes the message thru.services.v1.BatchSendTransactionsRequest.
|
|
84
|
+
* Use `create(BatchSendTransactionsRequestSchema)` to create a new message.
|
|
85
|
+
*/
|
|
86
|
+
export const BatchSendTransactionsRequestSchema: GenMessage<BatchSendTransactionsRequest> = /*@__PURE__*/
|
|
87
|
+
messageDesc(file_thru_services_v1_command_service, 2);
|
|
88
|
+
|
|
89
|
+
/**
|
|
90
|
+
* BatchSendTransactionsResponse returns submission results for each transaction.
|
|
91
|
+
*
|
|
92
|
+
* @generated from message thru.services.v1.BatchSendTransactionsResponse
|
|
93
|
+
*/
|
|
94
|
+
export type BatchSendTransactionsResponse = Message<"thru.services.v1.BatchSendTransactionsResponse"> & {
|
|
95
|
+
/**
|
|
96
|
+
* Signatures for each transaction (in same order as request).
|
|
97
|
+
*
|
|
98
|
+
* @generated from field: repeated thru.core.v1.Signature signatures = 1;
|
|
99
|
+
*/
|
|
100
|
+
signatures: Signature[];
|
|
101
|
+
|
|
102
|
+
/**
|
|
103
|
+
* Acceptance status for each transaction (true if accepted, false if not).
|
|
104
|
+
*
|
|
105
|
+
* @generated from field: repeated bool accepted = 2;
|
|
106
|
+
*/
|
|
107
|
+
accepted: boolean[];
|
|
108
|
+
};
|
|
109
|
+
|
|
110
|
+
/**
|
|
111
|
+
* Describes the message thru.services.v1.BatchSendTransactionsResponse.
|
|
112
|
+
* Use `create(BatchSendTransactionsResponseSchema)` to create a new message.
|
|
113
|
+
*/
|
|
114
|
+
export const BatchSendTransactionsResponseSchema: GenMessage<BatchSendTransactionsResponse> = /*@__PURE__*/
|
|
115
|
+
messageDesc(file_thru_services_v1_command_service, 3);
|
|
116
|
+
|
|
62
117
|
/**
|
|
63
118
|
* CommandService defines transactional RPCs that mutate state or perform
|
|
64
119
|
* expensive computations.
|
|
@@ -76,6 +131,16 @@ export const CommandService: GenService<{
|
|
|
76
131
|
input: typeof SendTransactionRequestSchema;
|
|
77
132
|
output: typeof SendTransactionResponseSchema;
|
|
78
133
|
},
|
|
134
|
+
/**
|
|
135
|
+
* Submit multiple transactions to the cluster in batch.
|
|
136
|
+
*
|
|
137
|
+
* @generated from rpc thru.services.v1.CommandService.BatchSendTransactions
|
|
138
|
+
*/
|
|
139
|
+
batchSendTransactions: {
|
|
140
|
+
methodKind: "unary";
|
|
141
|
+
input: typeof BatchSendTransactionsRequestSchema;
|
|
142
|
+
output: typeof BatchSendTransactionsResponseSchema;
|
|
143
|
+
},
|
|
79
144
|
}> = /*@__PURE__*/
|
|
80
145
|
serviceDesc(file_thru_services_v1_command_service, 0);
|
|
81
146
|
|