@tari-project/ootle-ts-bindings 1.23.3 → 1.24.1

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.
Files changed (27) hide show
  1. package/dist/index.d.ts +2 -1
  2. package/dist/index.js +2 -1
  3. package/dist/types/Bytes.d.ts +3 -3
  4. package/dist/types/ComponentHeader.d.ts +2 -2
  5. package/dist/types/Event.d.ts +2 -2
  6. package/dist/types/FinalizeResult.d.ts +2 -2
  7. package/dist/types/{Hash.d.ts → Hash32.d.ts} +1 -1
  8. package/dist/types/Instruction.d.ts +3 -3
  9. package/dist/types/PrecisionAmount.d.ts +10 -0
  10. package/dist/types/PrecisionAmount.js +2 -0
  11. package/dist/types/RuleRequirement.d.ts +2 -2
  12. package/dist/types/UpSubstate.d.ts +2 -1
  13. package/dist/types/tari-indexer-client/IndexerGetEpochManagerStatsResponse.d.ts +2 -1
  14. package/dist/types/tari-indexer-client/IndexerGetTransactionResultRequest.d.ts +3 -0
  15. package/dist/types/tari-indexer-client/IndexerGetTransactionResultResponse.d.ts +4 -0
  16. package/dist/types/tari-indexer-client/IndexerSubmitTransactionRequest.d.ts +3 -0
  17. package/dist/types/tari-indexer-client/IndexerSubmitTransactionResponse.d.ts +7 -0
  18. package/dist/types/tari-indexer-client/ListSubstateItem.d.ts +2 -2
  19. package/dist/types/tari-indexer-client/ListSubstatesRequest.d.ts +2 -2
  20. package/dist/types/tari-indexer-client/TemplateMetadata.d.ts +3 -3
  21. package/dist/types/validator-node-client/GetTemplateRequest.d.ts +2 -2
  22. package/dist/types/validator-node-client/VNTemplateMetadata.d.ts +2 -2
  23. package/dist/types/wallet-types/AuthoredTemplate.d.ts +2 -2
  24. package/dist/types/wallet-types/TemplatesGetRequest.d.ts +2 -2
  25. package/dist/types/wallet-types/WalletSubstateInfo.d.ts +2 -2
  26. package/package.json +1 -1
  27. /package/dist/types/{Hash.js → Hash32.js} +0 -0
package/dist/index.d.ts CHANGED
@@ -51,8 +51,8 @@ export * from "./types/FinalizeOutcome";
51
51
  export * from "./types/FinalizeResult";
52
52
  export * from "./types/ForeignProposalAtom";
53
53
  export * from "./types/FunctionDef";
54
+ export * from "./types/Hash32";
54
55
  export * from "./types/Hash64";
55
- export * from "./types/Hash";
56
56
  export * from "./types/IndexedValue";
57
57
  export * from "./types/IndexedWellKnownTypes";
58
58
  export * from "./types/InstructionArg";
@@ -85,6 +85,7 @@ export * from "./types/OwnerRule";
85
85
  export * from "./types/PayRef";
86
86
  export * from "./types/PedersenCommitmentBytes";
87
87
  export * from "./types/PeerAddress";
88
+ export * from "./types/PrecisionAmount";
88
89
  export * from "./types/ProofId";
89
90
  export * from "./types/ProposalCertificate";
90
91
  export * from "./types/PublishedTemplateAddress";
package/dist/index.js CHANGED
@@ -53,8 +53,8 @@ export * from "./types/FinalizeOutcome";
53
53
  export * from "./types/FinalizeResult";
54
54
  export * from "./types/ForeignProposalAtom";
55
55
  export * from "./types/FunctionDef";
56
+ export * from "./types/Hash32";
56
57
  export * from "./types/Hash64";
57
- export * from "./types/Hash";
58
58
  export * from "./types/IndexedValue";
59
59
  export * from "./types/IndexedWellKnownTypes";
60
60
  export * from "./types/InstructionArg";
@@ -87,6 +87,7 @@ export * from "./types/OwnerRule";
87
87
  export * from "./types/PayRef";
88
88
  export * from "./types/PedersenCommitmentBytes";
89
89
  export * from "./types/PeerAddress";
90
+ export * from "./types/PrecisionAmount";
90
91
  export * from "./types/ProofId";
91
92
  export * from "./types/ProposalCertificate";
92
93
  export * from "./types/PublishedTemplateAddress";
@@ -2,8 +2,8 @@
2
2
  * A wrapper around a byte buffer that implements efficient serde serialisation.
3
3
  *
4
4
  * Unfortunately, because we cannot implement a specialized version of serde::Serialize (impl serde::Serialize for
5
- * Vec<u8>) ciborium will represent bytes as `Array(vec![Integer(u8), ....])` instead of `Bytes(vec![u8, ...])`. which
6
- * results in a significant size overhead. This wrapper uses the `Value::Bytes` variant (similar to `serde_as(as =
7
- * "Bytes")`).
5
+ * `Vec<u8>`) ciborium will represent bytes as `Array(vec![Integer(u8), ....])` instead of `Bytes(vec![u8, ...])`.
6
+ * which results in a significant size overhead. This wrapper uses the `Value::Bytes` variant (similar to `serde_as(as
7
+ * = "Bytes")`).
8
8
  */
9
9
  export type Bytes = Uint8Array;
@@ -1,11 +1,11 @@
1
1
  import type { ComponentAccessRules } from "./ComponentAccessRules";
2
2
  import type { ComponentBody } from "./ComponentBody";
3
3
  import type { EntityId } from "./EntityId";
4
- import type { Hash } from "./Hash";
4
+ import type { Hash32 } from "./Hash32";
5
5
  import type { OwnerRule } from "./OwnerRule";
6
6
  import type { RistrettoPublicKeyBytes } from "./RistrettoPublicKeyBytes";
7
7
  export type ComponentHeader = {
8
- template_address: Hash;
8
+ template_address: Hash32;
9
9
  module_name: string;
10
10
  owner_key: RistrettoPublicKeyBytes | null;
11
11
  owner_rule: OwnerRule;
@@ -1,9 +1,9 @@
1
- import type { Hash } from "./Hash";
1
+ import type { Hash32 } from "./Hash32";
2
2
  import type { Metadata } from "./Metadata";
3
3
  import type { SubstateId } from "./SubstateId";
4
4
  export type Event = {
5
5
  substate_id: SubstateId | null;
6
- template_address: Hash;
6
+ template_address: Hash32;
7
7
  topic: string;
8
8
  payload: Metadata;
9
9
  };
@@ -1,11 +1,11 @@
1
1
  import type { Event } from "./Event";
2
2
  import type { FeeReceipt } from "./FeeReceipt";
3
- import type { Hash } from "./Hash";
3
+ import type { Hash32 } from "./Hash32";
4
4
  import type { InstructionResult } from "./InstructionResult";
5
5
  import type { LogEntry } from "./LogEntry";
6
6
  import type { TransactionResult } from "./TransactionResult";
7
7
  export type FinalizeResult = {
8
- transaction_hash: Hash;
8
+ transaction_hash: Hash32;
9
9
  events: Array<Event>;
10
10
  logs: Array<LogEntry>;
11
11
  execution_results: Array<InstructionResult>;
@@ -1,4 +1,4 @@
1
1
  /**
2
2
  * Representation of a 32-byte hash value
3
3
  */
4
- export type Hash = string;
4
+ export type Hash32 = string;
@@ -3,7 +3,7 @@ import type { Amount } from "./Amount";
3
3
  import type { ClaimBurnOutputData } from "./ClaimBurnOutputData";
4
4
  import type { ComponentAccessRules } from "./ComponentAccessRules";
5
5
  import type { ComponentReference } from "./ComponentReference";
6
- import type { Hash } from "./Hash";
6
+ import type { Hash32 } from "./Hash32";
7
7
  import type { InstructionArg } from "./InstructionArg";
8
8
  import type { LogLevel } from "./LogLevel";
9
9
  import type { MigrateFunction } from "./MigrateFunction";
@@ -24,7 +24,7 @@ export type Instruction = {
24
24
  };
25
25
  } | {
26
26
  CallFunction: {
27
- address: Hash;
27
+ address: Hash32;
28
28
  function: string;
29
29
  args: Array<InstructionArg>;
30
30
  };
@@ -92,6 +92,6 @@ export type Instruction = {
92
92
  UpdateComponentTemplate: {
93
93
  component: ComponentReference;
94
94
  migrate: MigrateFunction | null;
95
- new_template: Hash;
95
+ new_template: Hash32;
96
96
  };
97
97
  };
@@ -0,0 +1,10 @@
1
+ /**
2
+ * A 192-bit signed amount.
3
+ *
4
+ * This is a general purpose signed integer, but is primarily used to represent the smallest unit of value in
5
+ * resources/vaults etc.
6
+ *
7
+ * This allows Tari to support a massive number tokens within resources.
8
+ * e.g. 2 ETH = 2 x 10^18 Gwei.
9
+ */
10
+ export type PrecisionAmount = string | number;
@@ -0,0 +1,2 @@
1
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
2
+ export {};
@@ -1,5 +1,5 @@
1
1
  import type { ComponentAddress } from "./ComponentAddress";
2
- import type { Hash } from "./Hash";
2
+ import type { Hash32 } from "./Hash32";
3
3
  import type { NonFungibleAddress } from "./NonFungibleAddress";
4
4
  import type { ResourceAddress } from "./ResourceAddress";
5
5
  /**
@@ -12,5 +12,5 @@ export type RuleRequirement = {
12
12
  } | {
13
13
  ScopedToComponent: ComponentAddress;
14
14
  } | {
15
- ScopedToTemplate: Hash;
15
+ ScopedToTemplate: Hash32;
16
16
  };
@@ -1,6 +1,7 @@
1
+ import type { Hash32 } from "./Hash32";
1
2
  import type { SubstateId } from "./SubstateId";
2
3
  export type UpSubstate = {
3
4
  substate_id: SubstateId;
4
5
  version: number;
5
- value_hash: string;
6
+ value_hash: Hash32;
6
7
  };
@@ -1,6 +1,7 @@
1
1
  import type { Epoch } from "../Epoch";
2
+ import type { Hash32 } from "../Hash32";
2
3
  export type IndexerGetEpochManagerStatsResponse = {
3
4
  current_epoch: Epoch;
4
5
  current_block_height: number;
5
- current_block_hash: string;
6
+ current_block_hash: Hash32;
6
7
  };
@@ -1,4 +1,7 @@
1
1
  import type { TransactionId } from "../TransactionId";
2
2
  export type IndexerGetTransactionResultRequest = {
3
+ /**
4
+ * The ID of the transaction to query the result for
5
+ */
3
6
  transaction_id: TransactionId;
4
7
  };
@@ -1,4 +1,8 @@
1
1
  import type { IndexerTransactionFinalizedResult } from "./IndexerTransactionFinalizedResult";
2
2
  export type IndexerGetTransactionResultResponse = {
3
+ /**
4
+ * The result of the transaction, which may be pending (not yet finalized) or finalized with details such as the
5
+ * final decision, execution result, and timestamps
6
+ */
3
7
  result: IndexerTransactionFinalizedResult;
4
8
  };
@@ -1,4 +1,7 @@
1
1
  import type { TransactionEnvelope } from "../TransactionEnvelope";
2
2
  export type IndexerSubmitTransactionRequest = {
3
+ /**
4
+ * A BOR-encoded transaction envelope, base64 encoded as a string
5
+ */
3
6
  transaction: TransactionEnvelope;
4
7
  };
@@ -1,6 +1,13 @@
1
1
  import type { ExecuteResult } from "../ExecuteResult";
2
2
  import type { TransactionId } from "../TransactionId";
3
3
  export type IndexerSubmitTransactionResponse = {
4
+ /**
5
+ * The ID of the transaction that was dry-run
6
+ */
4
7
  transaction_id: TransactionId;
8
+ /**
9
+ * The result of the dry-run execution, including any emitted events and state changes, but without a final
10
+ * decision or commitment to the ledger
11
+ */
5
12
  result: ExecuteResult;
6
13
  };
@@ -1,9 +1,9 @@
1
- import type { Hash } from "../Hash";
1
+ import type { Hash32 } from "../Hash32";
2
2
  import type { SubstateId } from "../SubstateId";
3
3
  export type ListSubstateItem = {
4
4
  substate_id: SubstateId;
5
5
  module_name: string | null;
6
6
  version: number;
7
- template_address: Hash | null;
7
+ template_address: Hash32 | null;
8
8
  timestamp: string;
9
9
  };
@@ -1,9 +1,9 @@
1
- import type { Hash } from "../Hash";
1
+ import type { Hash32 } from "../Hash32";
2
2
  import type { SubstateId } from "../SubstateId";
3
3
  import type { SubstateType } from "../SubstateType";
4
4
  export type ListSubstatesRequest = {
5
5
  by_id: SubstateId | null;
6
- filter_by_template: Hash | null;
6
+ filter_by_template: Hash32 | null;
7
7
  filter_by_type: SubstateType | null;
8
8
  limit: bigint | null;
9
9
  offset: bigint | null;
@@ -1,10 +1,10 @@
1
1
  import type { Epoch } from "../Epoch";
2
- import type { Hash } from "../Hash";
2
+ import type { Hash32 } from "../Hash32";
3
3
  import type { RistrettoPublicKeyBytes } from "../RistrettoPublicKeyBytes";
4
4
  export type TemplateMetadata = {
5
5
  name: string;
6
- address: Hash;
7
- binary_sha: string;
6
+ address: Hash32;
7
+ binary_sha: Hash32;
8
8
  author_public_key: RistrettoPublicKeyBytes;
9
9
  code_size: number;
10
10
  epoch: Epoch;
@@ -1,4 +1,4 @@
1
- import type { Hash } from "../Hash";
1
+ import type { Hash32 } from "../Hash32";
2
2
  export type GetTemplateRequest = {
3
- template_address: Hash;
3
+ template_address: Hash32;
4
4
  };
@@ -1,8 +1,8 @@
1
- import type { Hash } from "../Hash";
1
+ import type { Hash32 } from "../Hash32";
2
2
  import type { RistrettoPublicKeyBytes } from "../RistrettoPublicKeyBytes";
3
3
  export type VNTemplateMetadata = {
4
4
  name: string;
5
- address: Hash;
5
+ address: Hash32;
6
6
  code_size: number;
7
7
  author: RistrettoPublicKeyBytes;
8
8
  };
@@ -1,9 +1,9 @@
1
1
  import type { FunctionDef } from "../FunctionDef";
2
- import type { Hash } from "../Hash";
2
+ import type { Hash32 } from "../Hash32";
3
3
  import type { RistrettoPublicKeyBytes } from "../RistrettoPublicKeyBytes";
4
4
  export type AuthoredTemplate = {
5
5
  author_public_key: RistrettoPublicKeyBytes;
6
- address: Hash;
6
+ address: Hash32;
7
7
  name: string;
8
8
  abi_version: number;
9
9
  functions: Array<FunctionDef>;
@@ -1,4 +1,4 @@
1
- import type { Hash } from "../Hash";
1
+ import type { Hash32 } from "../Hash32";
2
2
  export type TemplatesGetRequest = {
3
- template_address: Hash;
3
+ template_address: Hash32;
4
4
  };
@@ -1,9 +1,9 @@
1
- import type { Hash } from "../Hash";
1
+ import type { Hash32 } from "../Hash32";
2
2
  import type { SubstateId } from "../SubstateId";
3
3
  export type WalletSubstateInfo = {
4
4
  substate_id: SubstateId;
5
5
  parent_id: SubstateId | null;
6
6
  module_name: string | null;
7
7
  version: number;
8
- template_address: Hash | null;
8
+ template_address: Hash32 | null;
9
9
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tari-project/ootle-ts-bindings",
3
- "version": "1.23.3",
3
+ "version": "1.24.1",
4
4
  "private": false,
5
5
  "publishConfig": {
6
6
  "access": "public"
File without changes