@tari-project/ootle-ts-bindings 1.23.2 → 1.24.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.
Files changed (32) hide show
  1. package/dist/index.d.ts +4 -2
  2. package/dist/index.js +4 -2
  3. package/dist/types/Amount.d.ts +1 -1
  4. package/dist/types/Bytes.d.ts +3 -3
  5. package/dist/types/ComponentHeader.d.ts +2 -2
  6. package/dist/types/Event.d.ts +2 -2
  7. package/dist/types/FinalizeResult.d.ts +2 -2
  8. package/dist/types/{Hash.d.ts → Hash32.d.ts} +1 -1
  9. package/dist/types/Instruction.d.ts +8 -4
  10. package/dist/types/MinotariBurnClaimProof.d.ts +1 -0
  11. package/dist/types/{PrivateOutput.d.ts → OutputBody.d.ts} +1 -1
  12. package/dist/types/PrecisionAmount.d.ts +10 -0
  13. package/dist/types/PrecisionAmount.js +2 -0
  14. package/dist/types/ResourceContainer.d.ts +3 -3
  15. package/dist/types/RuleRequirement.d.ts +2 -2
  16. package/dist/types/TemplateDefV1.d.ts +1 -1
  17. package/dist/types/UnsealedTransaction.d.ts +4 -0
  18. package/dist/types/UnsealedTransaction.js +1 -0
  19. package/dist/types/UpSubstate.d.ts +2 -1
  20. package/dist/types/UtxoOutput.d.ts +2 -2
  21. package/dist/types/tari-indexer-client/ListSubstateItem.d.ts +2 -2
  22. package/dist/types/tari-indexer-client/ListSubstatesRequest.d.ts +2 -2
  23. package/dist/types/tari-indexer-client/TemplateMetadata.d.ts +2 -2
  24. package/dist/types/validator-node-client/GetTemplateRequest.d.ts +2 -2
  25. package/dist/types/validator-node-client/TemplateAbi.d.ts +1 -1
  26. package/dist/types/validator-node-client/VNTemplateMetadata.d.ts +2 -2
  27. package/dist/types/wallet-types/AuthoredTemplate.d.ts +3 -3
  28. package/dist/types/wallet-types/TemplatesGetRequest.d.ts +2 -2
  29. package/dist/types/wallet-types/WalletSubstateInfo.d.ts +2 -2
  30. package/package.json +1 -1
  31. /package/dist/types/{Hash.js → Hash32.js} +0 -0
  32. /package/dist/types/{PrivateOutput.js → OutputBody.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";
@@ -79,12 +79,13 @@ export * from "./types/NonFungible";
79
79
  export * from "./types/NumPreshards";
80
80
  export * from "./types/OotleAddress";
81
81
  export * from "./types/Ordering";
82
+ export * from "./types/OutputBody";
82
83
  export * from "./types/OutputStatus";
83
84
  export * from "./types/OwnerRule";
84
85
  export * from "./types/PayRef";
85
86
  export * from "./types/PedersenCommitmentBytes";
86
87
  export * from "./types/PeerAddress";
87
- export * from "./types/PrivateOutput";
88
+ export * from "./types/PrecisionAmount";
88
89
  export * from "./types/ProofId";
89
90
  export * from "./types/ProposalCertificate";
90
91
  export * from "./types/PublishedTemplateAddress";
@@ -145,6 +146,7 @@ export * from "./types/TransactionStatus";
145
146
  export * from "./types/Transaction";
146
147
  export * from "./types/TransactionV1";
147
148
  export * from "./types/Type";
149
+ export * from "./types/UnsealedTransaction";
148
150
  export * from "./types/UnsealedTransactionV1";
149
151
  export * from "./types/UnsignedTransaction";
150
152
  export * from "./types/UnsignedTransactionV1";
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";
@@ -81,12 +81,13 @@ export * from "./types/NonFungible";
81
81
  export * from "./types/NumPreshards";
82
82
  export * from "./types/OotleAddress";
83
83
  export * from "./types/Ordering";
84
+ export * from "./types/OutputBody";
84
85
  export * from "./types/OutputStatus";
85
86
  export * from "./types/OwnerRule";
86
87
  export * from "./types/PayRef";
87
88
  export * from "./types/PedersenCommitmentBytes";
88
89
  export * from "./types/PeerAddress";
89
- export * from "./types/PrivateOutput";
90
+ export * from "./types/PrecisionAmount";
90
91
  export * from "./types/ProofId";
91
92
  export * from "./types/ProposalCertificate";
92
93
  export * from "./types/PublishedTemplateAddress";
@@ -147,6 +148,7 @@ export * from "./types/TransactionStatus";
147
148
  export * from "./types/Transaction";
148
149
  export * from "./types/TransactionV1";
149
150
  export * from "./types/Type";
151
+ export * from "./types/UnsealedTransaction";
150
152
  export * from "./types/UnsealedTransactionV1";
151
153
  export * from "./types/UnsignedTransaction";
152
154
  export * from "./types/UnsignedTransactionV1";
@@ -1,5 +1,5 @@
1
1
  /**
2
- * A 192-bit signed amount.
2
+ * A 128-bit signed amount.
3
3
  *
4
4
  * This is a general purpose signed integer, but is primarily used to represent the smallest unit of value in
5
5
  * resources/vaults etc.
@@ -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
  };
@@ -80,14 +80,18 @@ export type Instruction = {
80
80
  revealed_input_bucket: WorkspaceOffsetId | null;
81
81
  };
82
82
  } | {
83
- PayFee: {
83
+ PayFeeStealth: {
84
84
  statement: StealthTransferStatement;
85
85
  revealed_input_bucket: WorkspaceOffsetId | null;
86
86
  };
87
+ } | {
88
+ PayFeeFromBucket: {
89
+ bucket: WorkspaceOffsetId;
90
+ };
87
91
  } | {
88
92
  UpdateComponentTemplate: {
89
93
  component: ComponentReference;
90
94
  migrate: MigrateFunction | null;
91
- new_template: Hash;
95
+ new_template: Hash32;
92
96
  };
93
97
  };
@@ -13,4 +13,5 @@ export type MinotariBurnClaimProof = {
13
13
  encoded_merkle_proof: EncodedMerkleProof;
14
14
  kernel: AbridgedTransactionKernel;
15
15
  value: bigint;
16
+ sender_offset_public_key: RistrettoPublicKeyBytes;
16
17
  };
@@ -1,7 +1,7 @@
1
1
  import type { ElgamalVerifiableBalanceBytes } from "./ElgamalVerifiableBalanceBytes";
2
2
  import type { EncryptedData } from "./EncryptedData";
3
3
  import type { RistrettoPublicKeyBytes } from "./RistrettoPublicKeyBytes";
4
- export type PrivateOutput = {
4
+ export type OutputBody = {
5
5
  public_nonce: RistrettoPublicKeyBytes;
6
6
  encrypted_data: EncryptedData;
7
7
  minimum_value_promise: number | bigint;
@@ -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,7 +1,7 @@
1
1
  import type { Amount } from "./Amount";
2
2
  import type { NonFungibleId } from "./NonFungibleId";
3
+ import type { OutputBody } from "./OutputBody";
3
4
  import type { PedersenCommitmentBytes } from "./PedersenCommitmentBytes";
4
- import type { PrivateOutput } from "./PrivateOutput";
5
5
  import type { ResourceAddress } from "./ResourceAddress";
6
6
  /**
7
7
  * Instances of a single resource kept in Buckets and Vaults
@@ -22,11 +22,11 @@ export type ResourceContainer = {
22
22
  Confidential: {
23
23
  address: ResourceAddress;
24
24
  commitments: {
25
- [key in PedersenCommitmentBytes]?: PrivateOutput;
25
+ [key in PedersenCommitmentBytes]?: OutputBody;
26
26
  };
27
27
  revealed_amount: Amount;
28
28
  locked_commitments: {
29
- [key in PedersenCommitmentBytes]?: PrivateOutput;
29
+ [key in PedersenCommitmentBytes]?: OutputBody;
30
30
  };
31
31
  locked_revealed_amount: Amount;
32
32
  };
@@ -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,6 @@
1
1
  import type { FunctionDef } from "./FunctionDef";
2
2
  export type TemplateDefV1 = {
3
3
  template_name: string;
4
- tari_version: string;
4
+ abi_version: number;
5
5
  functions: Array<FunctionDef>;
6
6
  };
@@ -0,0 +1,4 @@
1
+ import type { UnsealedTransactionV1 } from "./UnsealedTransactionV1";
2
+ export type UnsealedTransaction = {
3
+ V1: UnsealedTransactionV1;
4
+ };
@@ -0,0 +1 @@
1
+ export {};
@@ -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,8 +1,8 @@
1
- import type { PrivateOutput } from "./PrivateOutput";
1
+ import type { OutputBody } from "./OutputBody";
2
2
  import type { SpendCondition } from "./SpendCondition";
3
3
  import type { UtxoTag } from "./UtxoTag";
4
4
  export type UtxoOutput = {
5
- output: PrivateOutput;
5
+ output: OutputBody;
6
6
  spend_condition: SpendCondition;
7
7
  tag: UtxoTag;
8
8
  };
@@ -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,9 +1,9 @@
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;
6
+ address: Hash32;
7
7
  binary_sha: string;
8
8
  author_public_key: RistrettoPublicKeyBytes;
9
9
  code_size: number;
@@ -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
  };
@@ -2,5 +2,5 @@ import type { VNFunctionDef } from "./VNFunctionDef";
2
2
  export type TemplateAbi = {
3
3
  template_name: string;
4
4
  functions: Array<VNFunctionDef>;
5
- version: string;
5
+ version: number;
6
6
  };
@@ -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,10 +1,10 @@
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
- tari_version: string;
8
+ abi_version: number;
9
9
  functions: Array<FunctionDef>;
10
10
  };
@@ -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.2",
3
+ "version": "1.24.0",
4
4
  "private": false,
5
5
  "publishConfig": {
6
6
  "access": "public"
File without changes
File without changes