@tari-project/tarijs-types 0.11.0 → 0.12.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.
@@ -0,0 +1,15 @@
1
+ import { BigAmount, ResourceAddress, ResourceType, Vault, VaultId } from "@tari-project/typescript-bindings";
2
+ export interface BuiltInAccount {
3
+ vaults: Record<ResourceAddress, VaultSubstate>;
4
+ }
5
+ export declare class VaultSubstate {
6
+ private vaultId;
7
+ private vault;
8
+ constructor(vaultId: VaultId, vault: Vault);
9
+ static new(vaultId: VaultId, vault: Vault): VaultSubstate;
10
+ get id(): VaultId;
11
+ get rawVault(): Vault;
12
+ get resourceType(): ResourceType;
13
+ get balance(): BigAmount;
14
+ get resourceAddress(): ResourceAddress;
15
+ }
@@ -0,0 +1,54 @@
1
+ import { BigAmount } from "@tari-project/typescript-bindings";
2
+ export class VaultSubstate {
3
+ vaultId;
4
+ vault;
5
+ constructor(vaultId, vault) {
6
+ this.vaultId = vaultId;
7
+ this.vault = vault;
8
+ }
9
+ static new(vaultId, vault) {
10
+ return new VaultSubstate(vaultId, vault);
11
+ }
12
+ get id() {
13
+ return this.vaultId;
14
+ }
15
+ get rawVault() {
16
+ return this.vault;
17
+ }
18
+ get resourceType() {
19
+ if ("Fungible" in this.vault.resource_container) {
20
+ return "Fungible";
21
+ }
22
+ if ("NonFungible" in this.vault.resource_container) {
23
+ return "NonFungible";
24
+ }
25
+ if ("Confidential" in this.vault.resource_container) {
26
+ return "Confidential";
27
+ }
28
+ throw new Error("Unknown resource type in vault");
29
+ }
30
+ get balance() {
31
+ if ("Fungible" in this.vault.resource_container) {
32
+ return BigAmount.from(this.vault.resource_container.Fungible.amount);
33
+ }
34
+ if ("NonFungible" in this.vault.resource_container) {
35
+ return BigAmount.from(this.vault.resource_container.NonFungible.token_ids.length);
36
+ }
37
+ if ("Confidential" in this.vault.resource_container) {
38
+ return BigAmount.from(this.vault.resource_container.Confidential.revealed_amount);
39
+ }
40
+ throw new Error("Unknown resource type in vault");
41
+ }
42
+ get resourceAddress() {
43
+ if ("Fungible" in this.vault.resource_container) {
44
+ return this.vault.resource_container.Fungible.address;
45
+ }
46
+ if ("NonFungible" in this.vault.resource_container) {
47
+ return this.vault.resource_container.NonFungible.address;
48
+ }
49
+ if ("Confidential" in this.vault.resource_container) {
50
+ return this.vault.resource_container.Confidential.address;
51
+ }
52
+ throw new Error("Unknown resource type in vault");
53
+ }
54
+ }
package/dist/Amount.d.ts CHANGED
@@ -2,7 +2,7 @@ export declare class Amount {
2
2
  private value;
3
3
  constructor(value: number);
4
4
  static readonly MAX: Amount;
5
- static newAmount(amount: number): Amount;
5
+ static new(amount: number): Amount;
6
6
  static zero(): Amount;
7
7
  isZero(): boolean;
8
8
  isPositive(): boolean;
@@ -20,4 +20,5 @@ export declare class Amount {
20
20
  checkedDiv(other: Amount): Amount | null;
21
21
  saturatingDiv(other: Amount): Amount;
22
22
  asU64Checked(): number | null;
23
+ toJSON(): number;
23
24
  }
package/dist/Amount.js CHANGED
@@ -4,7 +4,7 @@ export class Amount {
4
4
  this.value = value;
5
5
  }
6
6
  static MAX = new Amount(Number.MAX_SAFE_INTEGER);
7
- static newAmount(amount) {
7
+ static new(amount) {
8
8
  return new Amount(amount);
9
9
  }
10
10
  static zero() {
@@ -90,4 +90,7 @@ export class Amount {
90
90
  }
91
91
  return this.value;
92
92
  }
93
+ toJSON() {
94
+ return this.value;
95
+ }
93
96
  }
@@ -1,6 +1,5 @@
1
- import { TransactionStatus } from "./TransactionStatus";
2
1
  import { DownSubstates, UpSubstates } from "./SubstateDiff";
3
- import { ComponentAddress, FinalizeResult, TransactionResult } from "@tari-project/typescript-bindings";
2
+ import { ComponentAddress, TransactionResult } from "@tari-project/typescript-bindings";
4
3
  export type SubmitTransactionResponse = {
5
4
  transaction_id: string;
6
5
  };
@@ -12,8 +11,3 @@ export interface SubmitTxResult {
12
11
  newComponents: UpSubstates;
13
12
  getComponentForTemplate(templateAddress: string): ComponentAddress | null;
14
13
  }
15
- export type TransactionResultResponse = {
16
- transaction_id: string;
17
- status: TransactionStatus;
18
- result: FinalizeResult | null;
19
- };
@@ -0,0 +1,3 @@
1
+ export declare const ACCOUNT_TEMPLATE_ADDRESS = "0000000000000000000000000000000000000000000000000000000000000000";
2
+ export declare const TARI_RESOURCE = "resource_0101010101010101010101010101010101010101010101010101010101010101";
3
+ export declare const XTR = "resource_0101010101010101010101010101010101010101010101010101010101010101";
package/dist/consts.js ADDED
@@ -0,0 +1,3 @@
1
+ export const ACCOUNT_TEMPLATE_ADDRESS = "0000000000000000000000000000000000000000000000000000000000000000";
2
+ export const TARI_RESOURCE = "resource_0101010101010101010101010101010101010101010101010101010101010101";
3
+ export const XTR = TARI_RESOURCE;
@@ -3,6 +3,7 @@ import { TransactionStatus } from "../TransactionStatus";
3
3
  export { fromHexString, toHexString } from "./hexString";
4
4
  export { txResultCheck, getSubstateValueFromUpSubstates, getComponentsForTemplate } from "./txResult";
5
5
  export { BinaryTag, CborValue, convertTaggedValue, getCborValueByPath, parseCbor } from "./cbor";
6
+ export { SimpleSubstateDiff, SimpleTransactionResult, AnySubstate, UpSubstate, DownSubstate, splitOnce, } from "./simpleResult";
6
7
  export { substateIdToString, stringToSubstateId, shortenSubstateId, shortenString, rejectReasonToString, getSubstateDiffFromTransactionResult, getRejectReasonFromTransactionResult, jrpcPermissionToString, } from "@tari-project/typescript-bindings";
7
8
  export declare function convertStringToTransactionStatus(status: string): TransactionStatus;
8
9
  export declare function createNftAddressFromToken(token: NonFungibleToken): string;
@@ -2,6 +2,7 @@ import { TransactionStatus } from "../TransactionStatus";
2
2
  export { fromHexString, toHexString } from "./hexString";
3
3
  export { txResultCheck, getSubstateValueFromUpSubstates, getComponentsForTemplate } from "./txResult";
4
4
  export { BinaryTag, convertTaggedValue, getCborValueByPath, parseCbor } from "./cbor";
5
+ export { SimpleSubstateDiff, SimpleTransactionResult, splitOnce, } from "./simpleResult";
5
6
  export { substateIdToString, stringToSubstateId, shortenSubstateId, shortenString, rejectReasonToString, getSubstateDiffFromTransactionResult, getRejectReasonFromTransactionResult, jrpcPermissionToString, } from "@tari-project/typescript-bindings";
6
7
  export function convertStringToTransactionStatus(status) {
7
8
  switch (status) {
@@ -0,0 +1,76 @@
1
+ import { Vault, ComponentHeader, NonFungible, RejectReason, Resource, SubstateDiff, SubstateType, TransactionReceipt, UnclaimedConfidentialOutput, ValidatorFeePool, PublishedTemplate, ValidatorFeeWithdrawal, PublishedTemplateAddress, TransactionId, FinalizeResult, LogEntry, Event } from "@tari-project/typescript-bindings";
2
+ import { VaultSubstate, BuiltInAccount } from "../Account";
3
+ import { TransactionStatus } from "../TransactionStatus";
4
+ import { Option } from "@thames/monads";
5
+ import { GetTransactionResultResponse } from "../GetTransactionResultResponse";
6
+ export declare class SimpleTransactionResult {
7
+ private readonly transaction_id;
8
+ private readonly finalizeResult;
9
+ private readonly _status;
10
+ constructor(transaction_id: TransactionId, status: TransactionStatus, result: FinalizeResult);
11
+ static new(transaction_id: TransactionId, status: TransactionStatus, result: FinalizeResult): SimpleTransactionResult;
12
+ static fromResponse(resp: GetTransactionResultResponse): SimpleTransactionResult;
13
+ get transactionId(): string;
14
+ get result(): FinalizeResult;
15
+ get status(): TransactionStatus;
16
+ get logs(): LogEntry[];
17
+ get events(): Event[];
18
+ getResultingComponents(): ComponentHeader[];
19
+ getResultingResources(): Resource[];
20
+ getResultingVaults(): VaultSubstate[];
21
+ getResultingNonFungibles(): NonFungible[];
22
+ getTransactionReceipt(): TransactionReceipt;
23
+ getNewPublishedTemplates(): PublishedTemplate[];
24
+ getNewSubstatesOfType(type: SubstateType): AnySubstate[];
25
+ getUpSubstatesOfType(type: SubstateType): UpSubstate[];
26
+ getComponentsByTemplateAddress(templateAddress: PublishedTemplateAddress): SimpleComponent[];
27
+ getResultingAccounts(): GetAccountsResult[];
28
+ /**
29
+ * Returns the reject reason if the whole transaction was rejected or if the fee intent was executed but the main intent rejected
30
+ * Otherwise returns None.
31
+ */
32
+ get anyRejectReason(): Option<RejectReason>;
33
+ get accept(): Option<SimpleSubstateDiff>;
34
+ get diff(): Option<SimpleSubstateDiff>;
35
+ get onlyFeeAccepted(): Option<[SimpleSubstateDiff, RejectReason]>;
36
+ get rejected(): Option<RejectReason>;
37
+ }
38
+ export declare function splitOnce(str: string, separator: string): [string, string] | null;
39
+ export declare class SimpleSubstateDiff {
40
+ private up_substates;
41
+ private down_substates;
42
+ private fee_withdrawals;
43
+ constructor(diff: SubstateDiff);
44
+ static from(diff: SubstateDiff): SimpleSubstateDiff;
45
+ upSubstates(): UpSubstate[];
46
+ downSubstates(): DownSubstate[];
47
+ feeWithdrawals(): ValidatorFeeWithdrawal[];
48
+ }
49
+ export type AnySubstate = ComponentHeader | Resource | Vault | UnclaimedConfidentialOutput | NonFungible | TransactionReceipt | ValidatorFeePool | PublishedTemplate;
50
+ export type UpSubstate = {
51
+ type: SubstateType;
52
+ id: string;
53
+ version: number;
54
+ substate: AnySubstate;
55
+ };
56
+ export type DownSubstate = {
57
+ type: SubstateType;
58
+ id: string;
59
+ version: number;
60
+ };
61
+ export declare class SimpleComponent {
62
+ private _id;
63
+ private _version;
64
+ private _substate;
65
+ constructor(id: string, version: number, substate: ComponentHeader);
66
+ static new(id: string, version: number, substate: ComponentHeader): SimpleComponent;
67
+ get id(): string;
68
+ get version(): number;
69
+ get substate(): ComponentHeader;
70
+ decodeBody<T>(): T;
71
+ }
72
+ export interface GetAccountsResult {
73
+ substate_id: string;
74
+ version: number;
75
+ account: BuiltInAccount;
76
+ }
@@ -0,0 +1,239 @@
1
+ import { substateIdToString, } from "@tari-project/typescript-bindings";
2
+ import { VaultSubstate } from "../Account";
3
+ import { Some, None } from "@thames/monads";
4
+ import { parseCbor } from "../";
5
+ import { ACCOUNT_TEMPLATE_ADDRESS } from "../consts";
6
+ export class SimpleTransactionResult {
7
+ transaction_id;
8
+ finalizeResult;
9
+ _status;
10
+ constructor(transaction_id, status, result) {
11
+ this.transaction_id = transaction_id;
12
+ this._status = status;
13
+ this.finalizeResult = result;
14
+ }
15
+ static new(transaction_id, status, result) {
16
+ return new SimpleTransactionResult(transaction_id, status, result);
17
+ }
18
+ static fromResponse(resp) {
19
+ if (!resp.result) {
20
+ throw new Error("Transaction result is missing in the response");
21
+ }
22
+ return SimpleTransactionResult.new(resp.transaction_id, resp.status, resp.result);
23
+ }
24
+ get transactionId() {
25
+ return this.transaction_id;
26
+ }
27
+ get result() {
28
+ return this.finalizeResult;
29
+ }
30
+ get status() {
31
+ return this._status;
32
+ }
33
+ get logs() {
34
+ return this.result.logs;
35
+ }
36
+ get events() {
37
+ return this.result.events;
38
+ }
39
+ getResultingComponents() {
40
+ return this.getNewSubstatesOfType("Component");
41
+ }
42
+ getResultingResources() {
43
+ return this.getNewSubstatesOfType("Resource");
44
+ }
45
+ getResultingVaults() {
46
+ const vaults = this.getUpSubstatesOfType("Vault");
47
+ return vaults.map((upSubstate) => VaultSubstate.new(upSubstate.id, upSubstate.substate));
48
+ }
49
+ getResultingNonFungibles() {
50
+ return this.getNewSubstatesOfType("NonFungible");
51
+ }
52
+ getTransactionReceipt() {
53
+ return this.getNewSubstatesOfType("TransactionReceipt")[0];
54
+ }
55
+ getNewPublishedTemplates() {
56
+ return this.getNewSubstatesOfType("Template");
57
+ }
58
+ getNewSubstatesOfType(type) {
59
+ const upSubstates = this.getUpSubstatesOfType(type);
60
+ return upSubstates.map((upSubstate) => upSubstate.substate);
61
+ }
62
+ getUpSubstatesOfType(type) {
63
+ const diff = this.diff;
64
+ if (diff.isNone()) {
65
+ return [];
66
+ }
67
+ const d = diff.unwrap();
68
+ const substates = [];
69
+ for (const upSubstate of d.upSubstates()) {
70
+ if (upSubstate.type === type) {
71
+ substates.push(upSubstate);
72
+ }
73
+ }
74
+ return substates;
75
+ }
76
+ getComponentsByTemplateAddress(templateAddress) {
77
+ const diff = this.diff;
78
+ if (diff.isNone()) {
79
+ return [];
80
+ }
81
+ const d = diff.unwrap();
82
+ const components = [];
83
+ for (const upSubstate of d.upSubstates()) {
84
+ if (upSubstate.type === "Component" && upSubstate.substate.template_address === templateAddress) {
85
+ components.push(SimpleComponent.new(upSubstate.id, upSubstate.version, upSubstate.substate));
86
+ }
87
+ }
88
+ return components;
89
+ }
90
+ getResultingAccounts() {
91
+ const components = this.getComponentsByTemplateAddress(ACCOUNT_TEMPLATE_ADDRESS);
92
+ const accounts = [];
93
+ for (const component of components) {
94
+ const account = component.decodeBody();
95
+ accounts.push({ substate_id: component.id, version: component.version, account });
96
+ }
97
+ return accounts;
98
+ }
99
+ /**
100
+ * Returns the reject reason if the whole transaction was rejected or if the fee intent was executed but the main intent rejected
101
+ * Otherwise returns None.
102
+ */
103
+ get anyRejectReason() {
104
+ return this.rejected.or(this.onlyFeeAccepted.map((x) => x[1]));
105
+ }
106
+ get accept() {
107
+ const result = this.result;
108
+ const accept = result?.result.Accept;
109
+ if (!accept) {
110
+ return None;
111
+ }
112
+ return Some(SimpleSubstateDiff.from(accept));
113
+ }
114
+ get diff() {
115
+ return this.accept.or(this.onlyFeeAccepted.map((x => x[0])));
116
+ }
117
+ get onlyFeeAccepted() {
118
+ const result = this.result;
119
+ if (!result || !result.result || !("AcceptFeeRejectRest" in result.result)) {
120
+ return None;
121
+ }
122
+ const [diff, reason] = result?.result.AcceptFeeRejectRest;
123
+ return Some([SimpleSubstateDiff.from(diff), reason]);
124
+ }
125
+ get rejected() {
126
+ const result = this.result;
127
+ if (!result || !result.result) {
128
+ return None;
129
+ }
130
+ if (!("Reject" in result.result)) {
131
+ return None;
132
+ }
133
+ return Some(result?.result.Reject);
134
+ }
135
+ }
136
+ export function splitOnce(str, separator) {
137
+ const index = str.indexOf(separator);
138
+ if (index === -1) {
139
+ return null;
140
+ }
141
+ return [str.slice(0, index), str.slice(index + separator.length)];
142
+ }
143
+ function prefixToSubstateType(prefix) {
144
+ switch (prefix) {
145
+ case "component":
146
+ return "Component";
147
+ case "resource":
148
+ return "Resource";
149
+ case "vault":
150
+ return "Vault";
151
+ case "nft":
152
+ return "NonFungible";
153
+ case "txreceipt":
154
+ return "TransactionReceipt";
155
+ case "vnfp":
156
+ return "ValidatorFeePool";
157
+ case "template":
158
+ return "Template";
159
+ default:
160
+ console.log("Unknown substate type prefix", prefix);
161
+ return null;
162
+ }
163
+ }
164
+ export class SimpleSubstateDiff {
165
+ up_substates;
166
+ down_substates;
167
+ fee_withdrawals;
168
+ constructor(diff) {
169
+ this.up_substates = diff.up_substates
170
+ .map(([id, val]) => {
171
+ if (!val.substate) {
172
+ console.error("Substate is missing in the accept result", id, val);
173
+ return null;
174
+ }
175
+ const valType = Object.keys(val.substate)[0];
176
+ if (!valType) {
177
+ console.log("Substate is missing key", id, val);
178
+ return null;
179
+ }
180
+ const idVal = (typeof id === "string" ? id : Object.values(id)[0]);
181
+ return {
182
+ type: valType,
183
+ id: idVal,
184
+ version: val.version,
185
+ // @ts-ignore
186
+ substate: val.substate[valType],
187
+ };
188
+ })
189
+ .filter((x) => x !== null);
190
+ this.down_substates = diff.down_substates
191
+ .map(([id, version]) => {
192
+ const type = (typeof id === "string" ? prefixToSubstateType(splitOnce(id, "_")[0]) : Object.keys(id)[0]);
193
+ const idVal = substateIdToString(id);
194
+ return {
195
+ type: type,
196
+ id: idVal,
197
+ version,
198
+ };
199
+ });
200
+ this.fee_withdrawals = diff.fee_withdrawals;
201
+ }
202
+ static from(diff) {
203
+ return new SimpleSubstateDiff(diff);
204
+ }
205
+ upSubstates() {
206
+ return this.up_substates;
207
+ }
208
+ downSubstates() {
209
+ return this.down_substates;
210
+ }
211
+ feeWithdrawals() {
212
+ return this.fee_withdrawals;
213
+ }
214
+ }
215
+ export class SimpleComponent {
216
+ _id;
217
+ _version;
218
+ _substate;
219
+ constructor(id, version, substate) {
220
+ this._id = id;
221
+ this._version = version;
222
+ this._substate = substate;
223
+ }
224
+ static new(id, version, substate) {
225
+ return new SimpleComponent(id, version, substate);
226
+ }
227
+ get id() {
228
+ return this._id;
229
+ }
230
+ get version() {
231
+ return this._version;
232
+ }
233
+ get substate() {
234
+ return this._substate;
235
+ }
236
+ decodeBody() {
237
+ return parseCbor(this.substate.body.state);
238
+ }
239
+ }
@@ -33,11 +33,10 @@ export function getSubstateValueFromUpSubstates(substateType, upSubstates) {
33
33
  }
34
34
  export function getComponentsForTemplate(templateAddress, upSubstates) {
35
35
  const components = [];
36
- const templateAddressBytes = new TextEncoder().encode(templateAddress);
37
36
  for (const [substateId, substate] of upSubstates) {
38
37
  if ("Component" in substate.substate) {
39
38
  const componentHeader = substate.substate.Component;
40
- if (componentHeader.template_address === templateAddressBytes) {
39
+ if (componentHeader.template_address === templateAddress) {
41
40
  components.push(substateIdToString(substateId));
42
41
  }
43
42
  }
package/dist/index.d.ts CHANGED
@@ -1,5 +1,6 @@
1
1
  export { ComponentAddress, ResourceAddress, PublishedTemplateAddress, Epoch } from "@tari-project/typescript-bindings";
2
2
  export { Amount } from "./Amount";
3
+ export { BuiltInAccount, VaultSubstate } from "./Account";
3
4
  export { TransactionArg } from "./TransactionArg";
4
5
  export { ConfidentialClaim } from "./ConfidentialClaim";
5
6
  export { ConfidentialOutput } from "./ConfidentialOutput";
@@ -14,4 +15,5 @@ export { WorkspaceArg } from "./Workspace";
14
15
  export { ListAccountNftFromBalancesRequest } from "./ListAccountNftFromBalancesRequest";
15
16
  export { Network } from "./network";
16
17
  export { AccountData, ListSubstatesRequest, ListSubstatesResponse, SubmitTransactionRequest, Substate, SubstateMetadata, ReqSubstate, TemplateDefinition, VaultBalances, VaultData, GetSubstateRequest, } from "./signer";
17
- export { convertHexStringToU256Array, convertStringToTransactionStatus, convertU256ToHexString, createNftAddressFromResource, createNftAddressFromToken, getRejectReasonFromTransactionResult, getSubstateDiffFromTransactionResult, jrpcPermissionToString, rejectReasonToString, shortenString, shortenSubstateId, stringToSubstateId, substateIdToString, fromHexString, toHexString, convertTaggedValue, getCborValueByPath, parseCbor, getSubstateValueFromUpSubstates, getComponentsForTemplate, txResultCheck, BinaryTag, CborValue, } from "./helpers";
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
+ export { ACCOUNT_TEMPLATE_ADDRESS, XTR, TARI_RESOURCE } from "./consts";
package/dist/index.js CHANGED
@@ -1,4 +1,6 @@
1
1
  export { Amount } from "./Amount";
2
+ export { VaultSubstate } from "./Account";
2
3
  export { TransactionStatus, transactionStatusFromStr } from "./TransactionStatus";
3
4
  export { Network } from "./network";
4
- export { convertHexStringToU256Array, convertStringToTransactionStatus, convertU256ToHexString, createNftAddressFromResource, createNftAddressFromToken, getRejectReasonFromTransactionResult, getSubstateDiffFromTransactionResult, jrpcPermissionToString, rejectReasonToString, shortenString, shortenSubstateId, stringToSubstateId, substateIdToString, fromHexString, toHexString, convertTaggedValue, getCborValueByPath, parseCbor, getSubstateValueFromUpSubstates, getComponentsForTemplate, txResultCheck, BinaryTag, } from "./helpers";
5
+ export { convertHexStringToU256Array, convertStringToTransactionStatus, convertU256ToHexString, createNftAddressFromResource, createNftAddressFromToken, getRejectReasonFromTransactionResult, getSubstateDiffFromTransactionResult, jrpcPermissionToString, rejectReasonToString, shortenString, shortenSubstateId, stringToSubstateId, substateIdToString, fromHexString, toHexString, convertTaggedValue, getCborValueByPath, parseCbor, getSubstateValueFromUpSubstates, getComponentsForTemplate, txResultCheck, BinaryTag, SimpleTransactionResult, SimpleSubstateDiff, splitOnce, } from "./helpers";
6
+ export { ACCOUNT_TEMPLATE_ADDRESS, XTR, TARI_RESOURCE } from "./consts";
package/dist/signer.d.ts CHANGED
@@ -18,7 +18,7 @@ export interface AccountData {
18
18
  account_id: number;
19
19
  address: string;
20
20
  public_key: string;
21
- resources: VaultData[];
21
+ vaults: VaultData[];
22
22
  }
23
23
  export interface VaultData {
24
24
  type: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tari-project/tarijs-types",
3
- "version": "0.11.0",
3
+ "version": "0.12.0",
4
4
  "description": "",
5
5
  "type": "module",
6
6
  "publishConfig": {
@@ -10,7 +10,8 @@
10
10
  "author": "The Tari Community",
11
11
  "license": "ISC",
12
12
  "dependencies": {
13
- "@tari-project/typescript-bindings": ">=1.13.0"
13
+ "@tari-project/typescript-bindings": ">=1.14.0",
14
+ "@thames/monads": "^0.7.0"
14
15
  },
15
16
  "devDependencies": {
16
17
  "@types/node": "^22.13.1",