@tari-project/tarijs-types 0.13.1 → 0.14.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.
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { CompressedElgamalVerifiableBalance } from "@tari-project/typescript-bindings";
|
|
2
2
|
export interface ConfidentialOutput {
|
|
3
3
|
commitment: string;
|
|
4
4
|
stealthPublicNonce: string;
|
|
5
5
|
encrypted_data: Array<number>;
|
|
6
6
|
minimumValuePromise: number;
|
|
7
|
-
viewableBalance?:
|
|
7
|
+
viewableBalance?: CompressedElgamalVerifiableBalance;
|
|
8
8
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Vault, ComponentHeader, NonFungible, RejectReason, Resource, SubstateDiff, SubstateType, TransactionReceipt,
|
|
1
|
+
import { Vault, ComponentHeader, NonFungible, RejectReason, Resource, SubstateDiff, SubstateType, TransactionReceipt, ClaimedOutputTombstone, ValidatorFeePool, PublishedTemplate, ValidatorFeeWithdrawal, PublishedTemplateAddress, TransactionId, FinalizeResult, LogEntry, Event } from "@tari-project/typescript-bindings";
|
|
2
2
|
import { VaultSubstate, BuiltInAccount } from "../Account";
|
|
3
3
|
import { TransactionStatus } from "../TransactionStatus";
|
|
4
4
|
import { Option } from "@thames/monads";
|
|
@@ -46,7 +46,7 @@ export declare class SimpleSubstateDiff {
|
|
|
46
46
|
downSubstates(): DownSubstate[];
|
|
47
47
|
feeWithdrawals(): ValidatorFeeWithdrawal[];
|
|
48
48
|
}
|
|
49
|
-
export type AnySubstate = ComponentHeader | Resource | Vault |
|
|
49
|
+
export type AnySubstate = ComponentHeader | Resource | Vault | ClaimedOutputTombstone | NonFungible | TransactionReceipt | ValidatorFeePool | PublishedTemplate;
|
|
50
50
|
export type UpSubstate = {
|
|
51
51
|
type: SubstateType;
|
|
52
52
|
id: string;
|
|
@@ -1,10 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Vault, SubstateValue, ResourceContainer, ResourceAddress, Amount, ComponentAddress, FinalizeResult } from "@tari-project/typescript-bindings";
|
|
2
2
|
import { UpSubstates } from "../SubstateDiff";
|
|
3
3
|
export declare const txResultCheck: {
|
|
4
4
|
isAccept: (result: FinalizeResult) => boolean;
|
|
5
|
-
isVaultId: (substateId: SubstateId) => substateId is {
|
|
6
|
-
Vault: VaultId;
|
|
7
|
-
};
|
|
8
5
|
isVaultSubstate: (substate: SubstateValue) => substate is {
|
|
9
6
|
Vault: Vault;
|
|
10
7
|
};
|
package/dist/helpers/txResult.js
CHANGED
|
@@ -1,14 +1,8 @@
|
|
|
1
1
|
import { substateIdToString, } from "@tari-project/typescript-bindings";
|
|
2
|
-
function isOfType(obj, key) {
|
|
3
|
-
return obj !== null && typeof obj === "object" && key in obj;
|
|
4
|
-
}
|
|
5
2
|
export const txResultCheck = {
|
|
6
3
|
isAccept: (result) => {
|
|
7
4
|
return "Accept" in result.result;
|
|
8
5
|
},
|
|
9
|
-
isVaultId: (substateId) => {
|
|
10
|
-
return isOfType(substateId, "Vault");
|
|
11
|
-
},
|
|
12
6
|
isVaultSubstate: (substate) => {
|
|
13
7
|
return "Vault" in substate;
|
|
14
8
|
},
|
package/dist/index.d.ts
CHANGED
|
@@ -14,6 +14,6 @@ export { TransactionStatus, transactionStatusFromStr } from "./TransactionStatus
|
|
|
14
14
|
export { WorkspaceArg } from "./Workspace";
|
|
15
15
|
export { ListAccountNftFromBalancesRequest } from "./ListAccountNftFromBalancesRequest";
|
|
16
16
|
export { Network } from "./network";
|
|
17
|
-
export { AccountData, ListSubstatesRequest, ListSubstatesResponse, SubmitTransactionRequest, Substate, SubstateMetadata,
|
|
17
|
+
export { AccountData, GetSubstateRequest, ListNftsRequest, ListNftsResponse, ListSubstatesRequest, ListSubstatesResponse, ReqSubstate, SubmitTransactionRequest, Substate, SubstateMetadata, TemplateDefinition, VaultBalances, VaultData, } from "./signer";
|
|
18
18
|
export { convertHexStringToU256Array, convertStringToTransactionStatus, convertU256ToHexString, createNftAddressFromResource, createNftAddressFromToken, getRejectReasonFromTransactionResult, getSubstateDiffFromTransactionResult, jrpcPermissionToString, rejectReasonToString, shortenString, shortenSubstateId, stringToSubstateId, substateIdToString, fromHexString, toHexString, convertTaggedValue, getCborValueByPath, parseCbor, getSubstateValueFromUpSubstates, getComponentsForTemplate, txResultCheck, BinaryTag, CborValue, SimpleTransactionResult, SimpleSubstateDiff, AnySubstate, DownSubstate, UpSubstate, splitOnce, } from "./helpers";
|
|
19
19
|
export { ACCOUNT_TEMPLATE_ADDRESS, XTR, TARI_RESOURCE } from "./consts";
|
package/dist/signer.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { SubstateType, TemplateDef, UnsignedTransactionV1 } from "@tari-project/typescript-bindings";
|
|
1
|
+
import { SubstateType, TemplateDef, UnsignedTransactionV1, ComponentAddress, NonFungibleToken, OotleAddress } from "@tari-project/typescript-bindings";
|
|
2
2
|
export type SubstateMetadata = {
|
|
3
3
|
substate_id: string;
|
|
4
4
|
module_name: string | null;
|
|
@@ -16,8 +16,8 @@ export type SubmitTransactionRequest = {
|
|
|
16
16
|
};
|
|
17
17
|
export interface AccountData {
|
|
18
18
|
account_id: number;
|
|
19
|
-
|
|
20
|
-
|
|
19
|
+
component_address: ComponentAddress;
|
|
20
|
+
wallet_address: OotleAddress;
|
|
21
21
|
vaults: VaultData[];
|
|
22
22
|
}
|
|
23
23
|
export interface VaultData {
|
|
@@ -51,3 +51,11 @@ export type GetSubstateRequest = {
|
|
|
51
51
|
substate_address: string;
|
|
52
52
|
version: number | null;
|
|
53
53
|
};
|
|
54
|
+
export type ListNftsRequest = {
|
|
55
|
+
accountAddress: ComponentAddress;
|
|
56
|
+
limit: number | null;
|
|
57
|
+
offset: number | null;
|
|
58
|
+
};
|
|
59
|
+
export type ListNftsResponse = {
|
|
60
|
+
nfts: Array<NonFungibleToken>;
|
|
61
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tari-project/tarijs-types",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.14.1",
|
|
4
4
|
"description": "",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"publishConfig": {
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
"author": "The Tari Community",
|
|
11
11
|
"license": "ISC",
|
|
12
12
|
"dependencies": {
|
|
13
|
-
"@tari-project/typescript-bindings": ">=1.
|
|
13
|
+
"@tari-project/typescript-bindings": ">=1.17.0",
|
|
14
14
|
"@thames/monads": "^0.7.0"
|
|
15
15
|
},
|
|
16
16
|
"devDependencies": {
|