@tari-project/ootle-ts-bindings 1.42.0 → 1.43.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.
@@ -1,7 +1,7 @@
1
1
  import type { Hash32 } from "./Hash32";
2
2
  import type { HashAlg } from "./HashAlg";
3
3
  /**
4
- * A native, consensus-fixed local spend predicate committed as a [`SpendCondition::Builtin`] leaf (TIP-0006): a
4
+ * A native, consensus-fixed local spend predicate committed as an [`AtomicCondition::Builtin`] leaf (TIP-0006): a
5
5
  * timelock or hashlock that gates *this input* on a local fact. Constraints on the spending transaction's outputs are
6
6
  * a [`Covenant`] instead.
7
7
  *
@@ -1,6 +1,6 @@
1
1
  import type { Hash32 } from "./Hash32";
2
2
  /**
3
- * A native, consensus-fixed covenant committed as a [`SpendCondition::Covenant`] leaf (TIP-0006). Where a
3
+ * A native, consensus-fixed covenant committed as an [`AtomicCondition::Covenant`] leaf (TIP-0006). Where a
4
4
  * [`BuiltinPredicate`] gates an input on a local fact, a covenant constrains the *spending transaction* — which
5
5
  * outputs the spent value may flow to, and that the value is conserved — so it propagates conditions forward. Each
6
6
  * variant introspects the transfer's outputs natively, with canonical semantics in trusted core code. The set is a
@@ -1,7 +1,11 @@
1
1
  import type { AtomicCondition } from "./AtomicCondition";
2
2
  /**
3
- * A spend-condition leaf (v0) committed in a [`StealthUnspentOutput::condition_root`] tree: a flat, non-empty
3
+ * A spend-condition leaf (v0) committed in a stealth output's [`SpendAuthorization`] condition tree: a flat, non-empty
4
4
  * conjunction (logical AND) of [`AtomicCondition`]s. A script-path spend reveals one leaf and an inclusion proof; the
5
5
  * engine recomputes the root and, on a match, requires every atom in the conjunction to hold.
6
+ *
7
+ * Disjunction (OR) is the condition tree itself — each committed leaf is an alternative spend path — so a leaf needs
8
+ * no OR combinator, only this AND. Atoms are not self-referential, so a leaf cannot nest another leaf: there is no
9
+ * recursion to bound at decode and no nesting to reject at spend time.
6
10
  */
7
11
  export type SpendCondition = Array<AtomicCondition>;
@@ -4,9 +4,8 @@ import type { SpendCondition } from "./SpendCondition";
4
4
  /**
5
5
  * Selects, per spent stealth input, which authorisation path the spender is exercising (TIP-0006).
6
6
  *
7
- * The spend is witness-driven: the committed output only gates which witnesses are *admissible*
8
- * ([`StealthUnspentOutput::spend_key`](super::StealthUnspentOutput::spend_key) for the key path,
9
- * [`StealthUnspentOutput::condition_root`](super::StealthUnspentOutput::condition_root) for the script path); the
7
+ * The spend is witness-driven: the committed output's [`SpendAuthorization`](super::SpendAuthorization) only gates
8
+ * which witnesses are *admissible* (its `spend_key` for the key path, its `condition_root` for the script path); the
10
9
  * engine never assumes which path the spender picks. This type is pure data — no hashing — so it is safe to compile
11
10
  * into a template; the engine recomputes the Merkle root natively.
12
11
  */
@@ -0,0 +1,12 @@
1
+ import type { ResourceAddress } from "../ResourceAddress";
2
+ import type { TransactionId } from "../TransactionId";
3
+ import type { BalanceChangeSourceType } from "./BalanceChangeSourceType";
4
+ import type { ComponentAddressOrName } from "./ComponentAddressOrName";
5
+ export type AccountsGetBalanceChangesRequest = {
6
+ account: ComponentAddressOrName;
7
+ offset: number;
8
+ limit: number;
9
+ resource_address: ResourceAddress | null;
10
+ transaction_id: TransactionId | null;
11
+ source_type: BalanceChangeSourceType | null;
12
+ };
@@ -0,0 +1,5 @@
1
+ import type { BalanceChange } from "./BalanceChange";
2
+ export type AccountsGetBalanceChangesResponse = {
3
+ changes: Array<BalanceChange>;
4
+ total: bigint;
5
+ };
@@ -0,0 +1,21 @@
1
+ import type { Amount } from "../Amount";
2
+ import type { ComponentAddress } from "../ComponentAddress";
3
+ import type { ResourceAddress } from "../ResourceAddress";
4
+ import type { BalanceChangeSource } from "./BalanceChangeSource";
5
+ export type BalanceChange = {
6
+ id: number;
7
+ account_address: ComponentAddress;
8
+ vault_address: string | null;
9
+ resource_address: ResourceAddress;
10
+ token_symbol: string | null;
11
+ divisibility: number;
12
+ revealed_before: Amount;
13
+ revealed_after: Amount;
14
+ confidential_before: Amount;
15
+ confidential_after: Amount;
16
+ revealed_delta: string;
17
+ confidential_delta: string;
18
+ source: BalanceChangeSource;
19
+ transaction_id: string | null;
20
+ created_at: string;
21
+ };
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,8 @@
1
+ export type BalanceChangeSource = {
2
+ type: "Transaction";
3
+ transaction_id: string;
4
+ } | {
5
+ type: "Scan";
6
+ } | {
7
+ type: "Recovery";
8
+ };
@@ -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 {};
@@ -0,0 +1 @@
1
+ export type BalanceChangeSourceType = "Transaction" | "Scan" | "Recovery";
@@ -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 {};
@@ -49,6 +49,7 @@ export * from "./types/wallet-types/TemplatesListAuthoredRequest";
49
49
  export * from "./types/wallet-types/AccountsCreateRequest";
50
50
  export * from "./types/wallet-types/CallInstructionRequest";
51
51
  export * from "./types/wallet-types/AuthGetMethodRequest";
52
+ export * from "./types/wallet-types/AccountsGetBalanceChangesRequest";
52
53
  export * from "./types/wallet-types/WebauthnStartRegisterRequest";
53
54
  export * from "./types/wallet-types/AccountGetByKeyIndexRequest";
54
55
  export * from "./types/wallet-types/AddressBookDeleteResponse";
@@ -80,6 +81,7 @@ export * from "./types/wallet-types/GetValidatorFeesRequest";
80
81
  export * from "./types/wallet-types/ConfidentialCreateOutputProofRequest";
81
82
  export * from "./types/wallet-types/KeysCreateResponse";
82
83
  export * from "./types/wallet-types/WebauthnFinishAuthRequest";
84
+ export * from "./types/wallet-types/AccountsGetBalanceChangesResponse";
83
85
  export * from "./types/wallet-types/SwapPoolGetExchangeRateResponse";
84
86
  export * from "./types/wallet-types/MintFaucetNftResponse";
85
87
  export * from "./types/wallet-types/AuthCreateApiKeyResponse";
@@ -87,6 +89,7 @@ export * from "./types/wallet-types/AddressBookEntry";
87
89
  export * from "./types/wallet-types/ProofsFinalizeRequest";
88
90
  export * from "./types/wallet-types/BurnProofsGetRequest";
89
91
  export * from "./types/wallet-types/SwapPoolsListResponse";
92
+ export * from "./types/wallet-types/BalanceChange";
90
93
  export * from "./types/wallet-types/ProofsCancelRequest";
91
94
  export * from "./types/wallet-types/StealthUtxosDecryptValueRequest";
92
95
  export * from "./types/wallet-types/FeePoolDetails";
@@ -105,6 +108,7 @@ export * from "./types/wallet-types/AddressBookAddResponse";
105
108
  export * from "./types/wallet-types/ListNftsRequest";
106
109
  export * from "./types/wallet-types/TransactionSubmitRequest";
107
110
  export * from "./types/wallet-types/BurnProofsListRequest";
111
+ export * from "./types/wallet-types/BalanceChangeSourceType";
108
112
  export * from "./types/wallet-types/AccountsCreateStealthTransferStatementResponse";
109
113
  export * from "./types/wallet-types/IssuedApiKey";
110
114
  export * from "./types/wallet-types/BadgeUsage";
@@ -138,6 +142,7 @@ export * from "./types/wallet-types/AccountsCreateFreeTestCoinsRequest";
138
142
  export * from "./types/wallet-types/ConfidentialTransferRequest";
139
143
  export * from "./types/wallet-types/SettingsSetResponse";
140
144
  export * from "./types/wallet-types/AuthListSessionsRequest";
145
+ export * from "./types/wallet-types/BalanceChangeSource";
141
146
  export * from "./types/wallet-types/AuthRefreshResponse";
142
147
  export * from "./types/wallet-types/WebauthnAlreadyRegisteredRequest";
143
148
  export * from "./types/wallet-types/TransferStatementRequest";
@@ -51,6 +51,7 @@ export * from "./types/wallet-types/TemplatesListAuthoredRequest";
51
51
  export * from "./types/wallet-types/AccountsCreateRequest";
52
52
  export * from "./types/wallet-types/CallInstructionRequest";
53
53
  export * from "./types/wallet-types/AuthGetMethodRequest";
54
+ export * from "./types/wallet-types/AccountsGetBalanceChangesRequest";
54
55
  export * from "./types/wallet-types/WebauthnStartRegisterRequest";
55
56
  export * from "./types/wallet-types/AccountGetByKeyIndexRequest";
56
57
  export * from "./types/wallet-types/AddressBookDeleteResponse";
@@ -82,6 +83,7 @@ export * from "./types/wallet-types/GetValidatorFeesRequest";
82
83
  export * from "./types/wallet-types/ConfidentialCreateOutputProofRequest";
83
84
  export * from "./types/wallet-types/KeysCreateResponse";
84
85
  export * from "./types/wallet-types/WebauthnFinishAuthRequest";
86
+ export * from "./types/wallet-types/AccountsGetBalanceChangesResponse";
85
87
  export * from "./types/wallet-types/SwapPoolGetExchangeRateResponse";
86
88
  export * from "./types/wallet-types/MintFaucetNftResponse";
87
89
  export * from "./types/wallet-types/AuthCreateApiKeyResponse";
@@ -89,6 +91,7 @@ export * from "./types/wallet-types/AddressBookEntry";
89
91
  export * from "./types/wallet-types/ProofsFinalizeRequest";
90
92
  export * from "./types/wallet-types/BurnProofsGetRequest";
91
93
  export * from "./types/wallet-types/SwapPoolsListResponse";
94
+ export * from "./types/wallet-types/BalanceChange";
92
95
  export * from "./types/wallet-types/ProofsCancelRequest";
93
96
  export * from "./types/wallet-types/StealthUtxosDecryptValueRequest";
94
97
  export * from "./types/wallet-types/FeePoolDetails";
@@ -107,6 +110,7 @@ export * from "./types/wallet-types/AddressBookAddResponse";
107
110
  export * from "./types/wallet-types/ListNftsRequest";
108
111
  export * from "./types/wallet-types/TransactionSubmitRequest";
109
112
  export * from "./types/wallet-types/BurnProofsListRequest";
113
+ export * from "./types/wallet-types/BalanceChangeSourceType";
110
114
  export * from "./types/wallet-types/AccountsCreateStealthTransferStatementResponse";
111
115
  export * from "./types/wallet-types/IssuedApiKey";
112
116
  export * from "./types/wallet-types/BadgeUsage";
@@ -140,6 +144,7 @@ export * from "./types/wallet-types/AccountsCreateFreeTestCoinsRequest";
140
144
  export * from "./types/wallet-types/ConfidentialTransferRequest";
141
145
  export * from "./types/wallet-types/SettingsSetResponse";
142
146
  export * from "./types/wallet-types/AuthListSessionsRequest";
147
+ export * from "./types/wallet-types/BalanceChangeSource";
143
148
  export * from "./types/wallet-types/AuthRefreshResponse";
144
149
  export * from "./types/wallet-types/WebauthnAlreadyRegisteredRequest";
145
150
  export * from "./types/wallet-types/TransferStatementRequest";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tari-project/ootle-ts-bindings",
3
- "version": "1.42.0",
3
+ "version": "1.43.0",
4
4
  "private": false,
5
5
  "publishConfig": {
6
6
  "access": "public"