@tari-project/ootle-ts-bindings 1.34.2 → 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.
- package/dist/helpers/cbor.d.ts +38 -0
- package/dist/helpers/cbor.js +136 -0
- package/dist/helpers/helpers.d.ts +2 -2
- package/dist/helpers/helpers.js +48 -20
- package/dist/index.d.ts +45 -28
- package/dist/index.js +45 -28
- package/dist/tari-indexer-client.d.ts +53 -48
- package/dist/tari-indexer-client.js +53 -48
- package/dist/types/AtomicCondition.d.ts +17 -0
- package/dist/types/BuiltinPredicate.d.ts +24 -0
- package/dist/types/Bytes.d.ts +3 -5
- package/dist/types/Claims.d.ts +2 -2
- package/dist/types/Command.d.ts +4 -1
- package/dist/types/Covenant.d.ts +16 -0
- package/dist/types/Covenant.js +1 -0
- package/dist/types/CovenantBalanceClaim.d.ts +26 -0
- package/dist/types/CovenantBalanceClaim.js +1 -0
- package/dist/types/Crud.d.ts +1 -0
- package/dist/types/CurrentInputView.d.ts +14 -0
- package/dist/types/CurrentInputView.js +1 -0
- package/dist/types/EndEpochAtom.d.ts +17 -0
- package/dist/types/EndEpochAtom.js +2 -0
- package/dist/types/ExecuteResult.d.ts +7 -0
- package/dist/types/FeeSource.d.ts +1 -1
- package/dist/types/FunctionDoc.d.ts +7 -0
- package/dist/types/FunctionDoc.js +2 -0
- package/dist/types/HashAlg.d.ts +5 -0
- package/dist/types/HashAlg.js +2 -0
- package/dist/types/Instruction.d.ts +5 -0
- package/dist/types/Memo.d.ts +2 -0
- package/dist/types/MerkleProof.d.ts +11 -0
- package/dist/types/MerkleProof.js +1 -0
- package/dist/types/Permission.d.ts +43 -0
- package/dist/types/Permission.js +1 -0
- package/dist/types/Permissions.d.ts +2 -0
- package/dist/types/Permissions.js +1 -0
- package/dist/types/ReadOnly.d.ts +6 -0
- package/dist/types/ReadOnly.js +2 -0
- package/dist/types/ResourceAccessRules.d.ts +15 -12
- package/dist/types/SpendAuthorization.d.ts +24 -0
- package/dist/types/SpendAuthorization.js +1 -0
- package/dist/types/SpendCondition.d.ts +11 -7
- package/dist/types/SpendWitness.d.ts +18 -0
- package/dist/types/SpendWitness.js +1 -0
- package/dist/types/StealthInput.d.ts +5 -0
- package/dist/types/StealthInputView.d.ts +9 -0
- package/dist/types/StealthInputView.js +1 -0
- package/dist/types/StealthOutputView.d.ts +16 -0
- package/dist/types/StealthOutputView.js +1 -0
- package/dist/types/StealthTransferStatement.d.ts +6 -0
- package/dist/types/StealthUnspentOutput.d.ts +5 -2
- package/dist/types/TemplateFunction.d.ts +23 -0
- package/dist/types/TemplateFunction.js +1 -0
- package/dist/types/TemplateMetadata.d.ts +5 -0
- package/dist/types/TemplateMetadata.js +0 -1
- package/dist/types/TransactionPoolRecord.d.ts +6 -0
- package/dist/types/UpdateRule.d.ts +4 -0
- package/dist/types/UpdateRule.js +1 -0
- package/dist/types/UtxoOutput.d.ts +2 -2
- package/dist/types/tari-indexer-client/IndexerGetSubstateResponse.d.ts +6 -0
- package/dist/types/tari-indexer-client/IndexerGetTransactionResponse.d.ts +7 -0
- package/dist/types/tari-indexer-client/IndexerGetTransactionResponse.js +1 -0
- package/dist/types/tari-indexer-client/IndexerTransactionFinalizedResult.d.ts +5 -0
- package/dist/types/tari-indexer-client/ListValidatorsRequest.d.ts +7 -0
- package/dist/types/tari-indexer-client/ListValidatorsRequest.js +1 -0
- package/dist/types/tari-indexer-client/ListValidatorsResponse.d.ts +14 -0
- package/dist/types/tari-indexer-client/ListValidatorsResponse.js +1 -0
- package/dist/types/tari-indexer-client/TransactionEntry.d.ts +11 -0
- package/dist/types/tari-indexer-client/TransactionResultSummary.d.ts +6 -0
- package/dist/types/tari-indexer-client/TransactionResultSummary.js +1 -0
- package/dist/types/tari-indexer-client/ValidatorInfo.d.ts +34 -0
- package/dist/types/tari-indexer-client/ValidatorInfo.js +1 -0
- package/dist/types/tari-indexer-client/ValidatorStatus.d.ts +4 -0
- package/dist/types/validator-node-client/GetBlockResponse.d.ts +5 -0
- package/dist/types/wallet-types/AccountsGetBalanceChangesRequest.d.ts +12 -0
- package/dist/types/wallet-types/AccountsGetBalanceChangesRequest.js +1 -0
- package/dist/types/wallet-types/AccountsGetBalanceChangesResponse.d.ts +5 -0
- package/dist/types/wallet-types/AccountsGetBalanceChangesResponse.js +1 -0
- package/dist/types/wallet-types/AuthCreateApiKeyRequest.d.ts +25 -0
- package/dist/types/wallet-types/AuthCreateApiKeyRequest.js +2 -0
- package/dist/types/wallet-types/AuthCreateApiKeyResponse.d.ts +19 -0
- package/dist/types/wallet-types/AuthCreateApiKeyResponse.js +1 -0
- package/dist/types/wallet-types/AuthCredentials.d.ts +7 -0
- package/dist/types/wallet-types/AuthListApiKeysRequest.d.ts +10 -0
- package/dist/types/wallet-types/AuthListApiKeysRequest.js +2 -0
- package/dist/types/wallet-types/AuthListApiKeysResponse.d.ts +4 -0
- package/dist/types/wallet-types/AuthListApiKeysResponse.js +1 -0
- package/dist/types/wallet-types/AuthLoginRequest.d.ts +2 -2
- package/dist/types/wallet-types/AuthRevokeApiKeyRequest.d.ts +10 -0
- package/dist/types/wallet-types/AuthRevokeApiKeyRequest.js +2 -0
- package/dist/types/wallet-types/AuthRevokeApiKeyResponse.d.ts +1 -0
- package/dist/types/wallet-types/AuthRevokeApiKeyResponse.js +2 -0
- package/dist/types/wallet-types/AuthSessionInfo.d.ts +2 -2
- package/dist/types/wallet-types/BalanceChange.d.ts +21 -0
- package/dist/types/wallet-types/BalanceChange.js +1 -0
- package/dist/types/wallet-types/BalanceChangeSource.d.ts +8 -0
- package/dist/types/wallet-types/BalanceChangeSource.js +2 -0
- package/dist/types/wallet-types/BalanceChangeSourceType.d.ts +1 -0
- package/dist/types/wallet-types/BalanceChangeSourceType.js +2 -0
- package/dist/types/wallet-types/ClaimValidatorFeesRequest.d.ts +5 -0
- package/dist/types/wallet-types/IssuedApiKey.d.ts +32 -0
- package/dist/types/wallet-types/IssuedApiKey.js +1 -0
- package/dist/types/wallet-types/PayTo.d.ts +11 -0
- package/dist/types/wallet-types/StealthTransfer.d.ts +13 -0
- package/dist/types/wallet-types/TransactionGetAllRequest.d.ts +5 -3
- package/dist/types/wallet-types/UtxoInfo.d.ts +11 -2
- package/dist/types/wallet-types/WebauthnFinishRegisterRequest.d.ts +2 -2
- package/dist/validator-node-client.d.ts +42 -42
- package/dist/validator-node-client.js +42 -42
- package/dist/wallet-types.d.ts +154 -142
- package/dist/wallet-types.js +154 -142
- package/package.json +2 -2
- package/dist/types/AddressBookPermission.d.ts +0 -1
- package/dist/types/JrpcPermission.d.ts +0 -17
- package/dist/types/JrpcPermissions.d.ts +0 -2
- /package/dist/types/{JrpcPermission.js → AtomicCondition.js} +0 -0
- /package/dist/types/{JrpcPermissions.js → BuiltinPredicate.js} +0 -0
- /package/dist/types/{AddressBookPermission.js → Crud.js} +0 -0
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The atom committed by an [`Command::EndEpoch`] command.
|
|
3
|
+
*
|
|
4
|
+
* Carries the base-layer boundary-block hash of the *next* epoch. Because the hash is part of the
|
|
5
|
+
* command, it is committed in the block's command merkle root and ratified by the quorum that
|
|
6
|
+
* commits the end-of-epoch block: a validator only votes for the EOE block if `next_epoch_hash`
|
|
7
|
+
* matches its own (lagged, reorg-stable) oracle view. This prevents a node from unilaterally
|
|
8
|
+
* locking an epoch hash the committee never agreed on — the failure mode that wedges consensus when
|
|
9
|
+
* a base-layer reorg deeper than the confirmation depth straddles an epoch boundary.
|
|
10
|
+
*
|
|
11
|
+
* The Borsh layout (a single 32-byte hash) is identical to [`tari_sidechain::EndEpochAtom`] so the
|
|
12
|
+
* layer-2 `command_hasher` output matches what L1 recomputes during checkpoint inclusion-proof
|
|
13
|
+
* verification.
|
|
14
|
+
*/
|
|
15
|
+
export type EndEpochAtom = {
|
|
16
|
+
next_epoch_hash: string;
|
|
17
|
+
};
|
|
@@ -17,4 +17,11 @@ export type ExecuteResult = {
|
|
|
17
17
|
* lock to an epoch.
|
|
18
18
|
*/
|
|
19
19
|
execute_epoch: Epoch | null;
|
|
20
|
+
/**
|
|
21
|
+
* Total WASM metering points consumed by the transaction across all calls, including failed/aborted execution.
|
|
22
|
+
* Metering is deterministic, so every validator computes the identical value for the same transaction and
|
|
23
|
+
* pledged state. Used to enforce the per-block WASM points budget. Defaults to 0 when decoding executions
|
|
24
|
+
* persisted before this field existed.
|
|
25
|
+
*/
|
|
26
|
+
wasm_execution_points: bigint;
|
|
20
27
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export type FeeSource = "Initial" | "RuntimeCall" | "Storage" | "
|
|
1
|
+
export type FeeSource = "Initial" | "RuntimeCall" | "Storage" | "TransactionWeight" | "SignatureVerification" | "TemplateLoad" | "SubstateCreate" | "WasmExecution" | "TemplatePublish";
|
package/dist/types/Memo.d.ts
CHANGED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Hash32 } from "./Hash32";
|
|
2
|
+
/**
|
|
3
|
+
* An inclusion proof for a condition-tree (MAST) leaf: the sibling hashes from the leaf up to the root, bottom-first.
|
|
4
|
+
*
|
|
5
|
+
* Carries no direction bits — the engine re-sorts each pair lexicographically on the way up. This type is pure data
|
|
6
|
+
* (no hashing), so it lives beside the spend witness in the WASM-safe crate while the hashing stays native in
|
|
7
|
+
* `tari_engine_types`.
|
|
8
|
+
*/
|
|
9
|
+
export type MerkleProof = {
|
|
10
|
+
siblings: Array<Hash32>;
|
|
11
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import type { ComponentAddress } from "./ComponentAddress";
|
|
2
|
+
import type { Crud } from "./Crud";
|
|
3
|
+
import type { ReadOnly } from "./ReadOnly";
|
|
4
|
+
import type { ResourceAddress } from "./ResourceAddress";
|
|
5
|
+
/**
|
|
6
|
+
* A capability the wallet daemon recognises as granted by a caller or required
|
|
7
|
+
* by a handler.
|
|
8
|
+
*
|
|
9
|
+
* String grammar: `admin`, `webrtc`, or `<resource>:<action>[:<entity>]`.
|
|
10
|
+
* Scope semantics: an unscoped grant (`None`) satisfies any required scope;
|
|
11
|
+
* a scoped grant (`Some(addr)`) only satisfies an identical required scope.
|
|
12
|
+
* Mutation actions (`Create`/`Update`/`Delete`) imply `Read` on the same
|
|
13
|
+
* resource.
|
|
14
|
+
*/
|
|
15
|
+
export type Permission = "Admin" | {
|
|
16
|
+
Accounts: [Crud, ComponentAddress | null];
|
|
17
|
+
} | {
|
|
18
|
+
Keys: Crud;
|
|
19
|
+
} | {
|
|
20
|
+
Transactions: Crud;
|
|
21
|
+
} | {
|
|
22
|
+
Transfer: [Crud, ComponentAddress | null];
|
|
23
|
+
} | {
|
|
24
|
+
Templates: Crud;
|
|
25
|
+
} | {
|
|
26
|
+
Nfts: [Crud, ResourceAddress | null];
|
|
27
|
+
} | {
|
|
28
|
+
Confidential: [Crud, ComponentAddress | null];
|
|
29
|
+
} | {
|
|
30
|
+
StealthUtxos: [Crud, ComponentAddress | null];
|
|
31
|
+
} | {
|
|
32
|
+
Validators: Crud;
|
|
33
|
+
} | {
|
|
34
|
+
Settings: Crud;
|
|
35
|
+
} | {
|
|
36
|
+
AddressBook: Crud;
|
|
37
|
+
} | {
|
|
38
|
+
Substates: ReadOnly;
|
|
39
|
+
} | {
|
|
40
|
+
BurnProofs: ReadOnly;
|
|
41
|
+
} | {
|
|
42
|
+
SwapPools: ReadOnly;
|
|
43
|
+
} | "Webrtc";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,20 +1,23 @@
|
|
|
1
1
|
import type { AccessRule } from "./AccessRule";
|
|
2
|
+
import type { UpdateRule } from "./UpdateRule";
|
|
2
3
|
/**
|
|
3
4
|
* Information needed to specify access rules to a resource
|
|
4
5
|
*/
|
|
5
6
|
export type ResourceAccessRules = {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
7
|
+
mint: AccessRule;
|
|
8
|
+
mint_updater: UpdateRule;
|
|
9
|
+
burn: AccessRule;
|
|
10
|
+
burn_updater: UpdateRule;
|
|
11
|
+
recall: AccessRule;
|
|
12
|
+
recall_updater: UpdateRule;
|
|
13
|
+
withdraw: AccessRule;
|
|
14
|
+
withdraw_updater: UpdateRule;
|
|
15
|
+
deposit: AccessRule;
|
|
16
|
+
deposit_updater: UpdateRule;
|
|
17
|
+
update_nft_data: AccessRule;
|
|
18
|
+
nft_data_updater: UpdateRule;
|
|
13
19
|
freeze: AccessRule;
|
|
14
|
-
|
|
15
|
-
* Added post-launch. Appended last to keep bincode field positions stable for prior fields;
|
|
16
|
-
* this is still a breaking change for pre-existing substates because bincode cannot read a
|
|
17
|
-
* missing trailing field, so the chain must be reset or data migrated on upgrade.
|
|
18
|
-
*/
|
|
20
|
+
freeze_updater: UpdateRule;
|
|
19
21
|
update_metadata: AccessRule;
|
|
22
|
+
metadata_updater: UpdateRule;
|
|
20
23
|
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { Hash32 } from "./Hash32";
|
|
2
|
+
import type { RistrettoPublicKeyBytes } from "./RistrettoPublicKeyBytes";
|
|
3
|
+
/**
|
|
4
|
+
* How a stealth output is authorised at spend time (TIP-0006): a key path, a committed condition tree, or both.
|
|
5
|
+
*
|
|
6
|
+
* Modelled as an enum rather than a pair of `Option`s so the unspendable `{no key, no conditions}` state is
|
|
7
|
+
* unrepresentable — by construction in memory and at the decode boundary, with no runtime invariant to enforce.
|
|
8
|
+
*
|
|
9
|
+
* - **Key** — a one-time "stealth" public key; spendable by proving ownership of it (a signature, via the
|
|
10
|
+
* transaction's auth scope).
|
|
11
|
+
* - **Script** — the Merkle root (MAST) committing the set of alternative [`SpendCondition`] leaves; spendable by
|
|
12
|
+
* revealing one leaf plus an inclusion proof.
|
|
13
|
+
* - **KeyAndScript** — either path is admissible; the per-input `SpendWitness` selects which.
|
|
14
|
+
*/
|
|
15
|
+
export type SpendAuthorization = {
|
|
16
|
+
Key: RistrettoPublicKeyBytes;
|
|
17
|
+
} | {
|
|
18
|
+
Script: Hash32;
|
|
19
|
+
} | {
|
|
20
|
+
KeyAndScript: {
|
|
21
|
+
spend_key: RistrettoPublicKeyBytes;
|
|
22
|
+
condition_root: Hash32;
|
|
23
|
+
};
|
|
24
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,7 +1,11 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
import type { AtomicCondition } from "./AtomicCondition";
|
|
2
|
+
/**
|
|
3
|
+
* A spend-condition leaf (v0) committed in a stealth output's [`SpendAuthorization`] condition tree: a flat, non-empty
|
|
4
|
+
* conjunction (logical AND) of [`AtomicCondition`]s. A script-path spend reveals one leaf and an inclusion proof; the
|
|
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.
|
|
10
|
+
*/
|
|
11
|
+
export type SpendCondition = Array<AtomicCondition>;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { Bytes } from "./Bytes";
|
|
2
|
+
import type { MerkleProof } from "./MerkleProof";
|
|
3
|
+
import type { SpendCondition } from "./SpendCondition";
|
|
4
|
+
/**
|
|
5
|
+
* Selects, per spent stealth input, which authorisation path the spender is exercising (TIP-0006).
|
|
6
|
+
*
|
|
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
|
|
9
|
+
* engine never assumes which path the spender picks. This type is pure data — no hashing — so it is safe to compile
|
|
10
|
+
* into a template; the engine recomputes the Merkle root natively.
|
|
11
|
+
*/
|
|
12
|
+
export type SpendWitness = "KeyPath" | {
|
|
13
|
+
ScriptPath: {
|
|
14
|
+
leaf: SpendCondition;
|
|
15
|
+
proof: MerkleProof;
|
|
16
|
+
data: Bytes;
|
|
17
|
+
};
|
|
18
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { PedersenCommitmentBytes } from "./PedersenCommitmentBytes";
|
|
2
|
+
import type { SpendWitness } from "./SpendWitness";
|
|
2
3
|
/**
|
|
3
4
|
* A statement for stealth outputs to spend as inputs.
|
|
4
5
|
*/
|
|
@@ -7,4 +8,8 @@ export type StealthInput = {
|
|
|
7
8
|
* The commitment of the unspent output being spent
|
|
8
9
|
*/
|
|
9
10
|
commitment: PedersenCommitmentBytes;
|
|
11
|
+
/**
|
|
12
|
+
* Selects which authorisation path the spender is exercising for this input (TIP-0006). Defaults to the key path.
|
|
13
|
+
*/
|
|
14
|
+
witness: SpendWitness;
|
|
10
15
|
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { PedersenCommitmentBytes } from "./PedersenCommitmentBytes";
|
|
2
|
+
/**
|
|
3
|
+
* A read-only view of a stealth input being spent, as exposed to a spend script via the `SpendContext` host op.
|
|
4
|
+
*
|
|
5
|
+
* Confidential values remain hidden — only the commitment is visible, exactly as the balance proof operates.
|
|
6
|
+
*/
|
|
7
|
+
export type StealthInputView = {
|
|
8
|
+
commitment: PedersenCommitmentBytes;
|
|
9
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { PedersenCommitmentBytes } from "./PedersenCommitmentBytes";
|
|
2
|
+
import type { SpendAuthorization } from "./SpendAuthorization";
|
|
3
|
+
import type { UtxoTag } from "./UtxoTag";
|
|
4
|
+
/**
|
|
5
|
+
* A read-only view of a stealth output being created, as exposed to a spend script via the `SpendContext` host op.
|
|
6
|
+
*
|
|
7
|
+
* Confidential values remain hidden — only the commitment, `minimum_value_promise`, the output's
|
|
8
|
+
* [`SpendAuthorization`] and tag are visible. This is exactly what enables covenants: a predicate can assert
|
|
9
|
+
* properties of the outputs it produces (e.g. that they preserve its own `condition_root`).
|
|
10
|
+
*/
|
|
11
|
+
export type StealthOutputView = {
|
|
12
|
+
commitment: PedersenCommitmentBytes;
|
|
13
|
+
minimum_value_promise: bigint;
|
|
14
|
+
auth: SpendAuthorization;
|
|
15
|
+
tag: UtxoTag;
|
|
16
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { CovenantBalanceClaim } from "./CovenantBalanceClaim";
|
|
1
2
|
import type { SchnorrSignatureBytes } from "./SchnorrSignatureBytes";
|
|
2
3
|
import type { StealthInputsStatement } from "./StealthInputsStatement";
|
|
3
4
|
import type { StealthOutputsStatement } from "./StealthOutputsStatement";
|
|
@@ -9,4 +10,9 @@ export type StealthTransferStatement = {
|
|
|
9
10
|
* is valid). This may be None, if and only if, the transfer is revealed-only (i.e. no stealth inputs or outputs).
|
|
10
11
|
*/
|
|
11
12
|
balance_proof: SchnorrSignatureBytes | null;
|
|
13
|
+
/**
|
|
14
|
+
* Covenant sub-balance proofs (TIP-0006), one per input partition (keyed by `condition_root`) whose predicate
|
|
15
|
+
* requires value conservation. Empty when no spent input gates on a covenant.
|
|
16
|
+
*/
|
|
17
|
+
covenant_claims: Array<CovenantBalanceClaim>;
|
|
12
18
|
};
|
|
@@ -1,8 +1,11 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { SpendAuthorization } from "./SpendAuthorization";
|
|
2
2
|
import type { UnspentOutput } from "./UnspentOutput";
|
|
3
3
|
import type { UtxoTag } from "./UtxoTag";
|
|
4
|
+
/**
|
|
5
|
+
* A stealth unspent output, authorised at spend time per its [`SpendAuthorization`] (TIP-0006).
|
|
6
|
+
*/
|
|
4
7
|
export type StealthUnspentOutput = {
|
|
5
8
|
output: UnspentOutput;
|
|
6
|
-
|
|
9
|
+
auth: SpendAuthorization;
|
|
7
10
|
tag: UtxoTag;
|
|
8
11
|
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { Bytes } from "./Bytes";
|
|
2
|
+
import type { Hash32 } from "./Hash32";
|
|
3
|
+
/**
|
|
4
|
+
* A stateless WASM predicate that gates the spend of a stealth UTXO.
|
|
5
|
+
*
|
|
6
|
+
* The condition fully commits to `{template, function, args}`, so a spender cannot substitute a different predicate.
|
|
7
|
+
* Templates are immutable substates, so the referenced code cannot change once the output is committed.
|
|
8
|
+
*/
|
|
9
|
+
export type TemplateFunction = {
|
|
10
|
+
/**
|
|
11
|
+
* The template providing the predicate.
|
|
12
|
+
*/
|
|
13
|
+
template: Hash32;
|
|
14
|
+
/**
|
|
15
|
+
* The stateless (`is_mut == false`) predicate function on that template.
|
|
16
|
+
*/
|
|
17
|
+
function: string;
|
|
18
|
+
/**
|
|
19
|
+
* Bound parameters, positional — one CBOR-encoded value per leading (non-`SpendContext`) parameter, matching the
|
|
20
|
+
* engine's `Vec<Bytes>` call ABI. Baked into the condition at creation; the spender cannot alter them.
|
|
21
|
+
*/
|
|
22
|
+
args: Array<Bytes>;
|
|
23
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { FunctionDoc } from "./FunctionDoc";
|
|
1
2
|
/**
|
|
2
3
|
* Off-chain template metadata, serialized as CBOR for hashing and verification.
|
|
3
4
|
*
|
|
@@ -27,6 +28,10 @@ export type TemplateMetadata = {
|
|
|
27
28
|
* The template address of a previous version that this template supersedes.
|
|
28
29
|
*/
|
|
29
30
|
supersedes?: string | null;
|
|
31
|
+
/**
|
|
32
|
+
* Rustdoc comments extracted from public functions of the template, keyed by source order.
|
|
33
|
+
*/
|
|
34
|
+
functions?: Array<FunctionDoc>;
|
|
30
35
|
extra?: {
|
|
31
36
|
[key in string]?: string;
|
|
32
37
|
};
|
|
@@ -28,4 +28,10 @@ export type TransactionPoolRecord = {
|
|
|
28
28
|
locked_epoch: LockedEpoch | null;
|
|
29
29
|
last_updated: string;
|
|
30
30
|
last_updated_in_block: BlockId | null;
|
|
31
|
+
/**
|
|
32
|
+
* Static transaction weight (`Transaction::calculate_transaction_weight`), cached here so block
|
|
33
|
+
* proposal can budget by weight without loading the full transaction body. Computed once when the
|
|
34
|
+
* record is created.
|
|
35
|
+
*/
|
|
36
|
+
transaction_weight: bigint;
|
|
31
37
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { OutputBody } from "./OutputBody";
|
|
2
|
-
import type {
|
|
2
|
+
import type { SpendAuthorization } from "./SpendAuthorization";
|
|
3
3
|
import type { UtxoTag } from "./UtxoTag";
|
|
4
4
|
export type UtxoOutput = {
|
|
5
5
|
output: OutputBody;
|
|
6
|
-
|
|
6
|
+
auth: SpendAuthorization;
|
|
7
7
|
tag: UtxoTag;
|
|
8
8
|
};
|
|
@@ -2,4 +2,10 @@ import type { SubstateValue } from "../SubstateValue";
|
|
|
2
2
|
export type IndexerGetSubstateResponse = {
|
|
3
3
|
version: number;
|
|
4
4
|
substate: SubstateValue;
|
|
5
|
+
/**
|
|
6
|
+
* True when the indexer verified this substate's value against the shard group committee (via a
|
|
7
|
+
* merkle proof). False when proofs are disabled, or when no committee member could supply a
|
|
8
|
+
* proof yet (e.g. nothing committed since an epoch change) and the value was served unverified.
|
|
9
|
+
*/
|
|
10
|
+
verified: boolean;
|
|
5
11
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { Epoch } from "../Epoch";
|
|
2
|
+
import type { ValidatorInfo } from "./ValidatorInfo";
|
|
3
|
+
/**
|
|
4
|
+
* The validator roster for an epoch, as registered on the base layer and tracked by the epoch
|
|
5
|
+
* manager. Unlike the lazily-observed snapshots in `GetNetworkSyncStateResponse`, this is the
|
|
6
|
+
* complete consensus-derived validator set for the epoch.
|
|
7
|
+
*/
|
|
8
|
+
export type ListValidatorsResponse = {
|
|
9
|
+
/**
|
|
10
|
+
* The epoch the roster applies to.
|
|
11
|
+
*/
|
|
12
|
+
epoch: Epoch;
|
|
13
|
+
validators: Array<ValidatorInfo>;
|
|
14
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { PrunedTransaction } from "../PrunedTransaction";
|
|
2
2
|
import type { TransactionId } from "../TransactionId";
|
|
3
|
+
import type { TransactionResultSummary } from "./TransactionResultSummary";
|
|
3
4
|
export type TransactionEntry = {
|
|
4
5
|
transaction_id: TransactionId;
|
|
5
6
|
/**
|
|
@@ -8,4 +9,14 @@ export type TransactionEntry = {
|
|
|
8
9
|
*/
|
|
9
10
|
transaction: PrunedTransaction;
|
|
10
11
|
created_at: string;
|
|
12
|
+
/**
|
|
13
|
+
* Result summary from the locally indexed transaction receipt. None when no receipt has been
|
|
14
|
+
* indexed yet (pending or aborted).
|
|
15
|
+
*/
|
|
16
|
+
summary: TransactionResultSummary | null;
|
|
17
|
+
/**
|
|
18
|
+
* Reason the transaction was rejected by mempool validation when it was submitted through
|
|
19
|
+
* this indexer. None if the transaction was not rejected at submission.
|
|
20
|
+
*/
|
|
21
|
+
rejected_reason: string | null;
|
|
11
22
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import type { Epoch } from "../Epoch";
|
|
2
|
+
import type { RistrettoPublicKeyBytes } from "../RistrettoPublicKeyBytes";
|
|
3
|
+
import type { ShardGroup } from "../ShardGroup";
|
|
4
|
+
/**
|
|
5
|
+
* A single validator's registration entry for an epoch.
|
|
6
|
+
*/
|
|
7
|
+
export type ValidatorInfo = {
|
|
8
|
+
/**
|
|
9
|
+
* The validator's consensus public key.
|
|
10
|
+
*/
|
|
11
|
+
public_key: RistrettoPublicKeyBytes;
|
|
12
|
+
/**
|
|
13
|
+
* libp2p PeerId derived from the public key. Can be used to join against the liveness
|
|
14
|
+
* snapshots in `GetNetworkSyncStateResponse.validators`.
|
|
15
|
+
*/
|
|
16
|
+
peer_id: string;
|
|
17
|
+
/**
|
|
18
|
+
* The committee (shard group) the validator belongs to in this epoch.
|
|
19
|
+
*/
|
|
20
|
+
shard_group: ShardGroup;
|
|
21
|
+
/**
|
|
22
|
+
* The first epoch the validator's registration is active.
|
|
23
|
+
*/
|
|
24
|
+
start_epoch: Epoch;
|
|
25
|
+
/**
|
|
26
|
+
* The epoch the validator was deactivated, if any.
|
|
27
|
+
*/
|
|
28
|
+
end_epoch: Epoch | null;
|
|
29
|
+
/**
|
|
30
|
+
* The public key that may claim fees earned by this validator.
|
|
31
|
+
*/
|
|
32
|
+
fee_claim_public_key: RistrettoPublicKeyBytes;
|
|
33
|
+
vote_power: bigint;
|
|
34
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -13,6 +13,10 @@ export type ValidatorStatus = {
|
|
|
13
13
|
shard_group: ShardGroup;
|
|
14
14
|
epoch: Epoch;
|
|
15
15
|
height: bigint;
|
|
16
|
+
/**
|
|
17
|
+
* The validator's self-reported consensus pacemaker state. Diagnostic only - this is not
|
|
18
|
+
* verified, so it should not be relied upon for anything but display.
|
|
19
|
+
*/
|
|
16
20
|
state: ValidatorConsensusState;
|
|
17
21
|
/**
|
|
18
22
|
* Unix timestamp (seconds) at which this snapshot was captured. Clients
|
|
@@ -1,4 +1,9 @@
|
|
|
1
1
|
import type { Block } from "../Block";
|
|
2
2
|
export type GetBlockResponse = {
|
|
3
3
|
block: Block;
|
|
4
|
+
/**
|
|
5
|
+
* Total WASM metering points consumed by transactions executed for this block (the per-block budget is
|
|
6
|
+
* enforced against this sum).
|
|
7
|
+
*/
|
|
8
|
+
total_wasm_execution_points: bigint;
|
|
4
9
|
};
|
|
@@ -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 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|