xrp-tx 0.1.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 (229) hide show
  1. package/dist/errors.d.ts +20 -0
  2. package/dist/errors.d.ts.map +1 -0
  3. package/dist/errors.js +27 -0
  4. package/dist/errors.js.map +1 -0
  5. package/dist/groups/account.d.ts +15 -0
  6. package/dist/groups/account.d.ts.map +1 -0
  7. package/dist/groups/account.js +17 -0
  8. package/dist/groups/account.js.map +1 -0
  9. package/dist/groups/amm.d.ts +7 -0
  10. package/dist/groups/amm.d.ts.map +1 -0
  11. package/dist/groups/amm.js +7 -0
  12. package/dist/groups/amm.js.map +1 -0
  13. package/dist/groups/credential.d.ts +7 -0
  14. package/dist/groups/credential.d.ts.map +1 -0
  15. package/dist/groups/credential.js +7 -0
  16. package/dist/groups/credential.js.map +1 -0
  17. package/dist/groups/loan.d.ts +7 -0
  18. package/dist/groups/loan.d.ts.map +1 -0
  19. package/dist/groups/loan.js +7 -0
  20. package/dist/groups/loan.js.map +1 -0
  21. package/dist/groups/offer.d.ts +9 -0
  22. package/dist/groups/offer.d.ts.map +1 -0
  23. package/dist/groups/offer.js +9 -0
  24. package/dist/groups/offer.js.map +1 -0
  25. package/dist/groups/oracle.d.ts +7 -0
  26. package/dist/groups/oracle.d.ts.map +1 -0
  27. package/dist/groups/oracle.js +7 -0
  28. package/dist/groups/oracle.js.map +1 -0
  29. package/dist/groups/payment.d.ts +27 -0
  30. package/dist/groups/payment.d.ts.map +1 -0
  31. package/dist/groups/payment.js +23 -0
  32. package/dist/groups/payment.js.map +1 -0
  33. package/dist/groups/permissioned-domain.d.ts +7 -0
  34. package/dist/groups/permissioned-domain.d.ts.map +1 -0
  35. package/dist/groups/permissioned-domain.js +7 -0
  36. package/dist/groups/permissioned-domain.js.map +1 -0
  37. package/dist/groups/token.d.ts +15 -0
  38. package/dist/groups/token.d.ts.map +1 -0
  39. package/dist/groups/token.js +10 -0
  40. package/dist/groups/token.js.map +1 -0
  41. package/dist/groups/vault.d.ts +7 -0
  42. package/dist/groups/vault.d.ts.map +1 -0
  43. package/dist/groups/vault.js +7 -0
  44. package/dist/groups/vault.js.map +1 -0
  45. package/dist/groups/xchain.d.ts +7 -0
  46. package/dist/groups/xchain.d.ts.map +1 -0
  47. package/dist/groups/xchain.js +7 -0
  48. package/dist/groups/xchain.js.map +1 -0
  49. package/dist/index.d.ts +86 -0
  50. package/dist/index.d.ts.map +1 -0
  51. package/dist/index.js +63 -0
  52. package/dist/index.js.map +1 -0
  53. package/dist/registry.d.ts +17 -0
  54. package/dist/registry.d.ts.map +1 -0
  55. package/dist/registry.js +95 -0
  56. package/dist/registry.js.map +1 -0
  57. package/dist/transaction.d.ts +179 -0
  58. package/dist/transaction.d.ts.map +1 -0
  59. package/dist/transaction.js +205 -0
  60. package/dist/transaction.js.map +1 -0
  61. package/dist/transactions/account-delete.d.ts +20 -0
  62. package/dist/transactions/account-delete.d.ts.map +1 -0
  63. package/dist/transactions/account-delete.js +24 -0
  64. package/dist/transactions/account-delete.js.map +1 -0
  65. package/dist/transactions/account-set.d.ts +34 -0
  66. package/dist/transactions/account-set.d.ts.map +1 -0
  67. package/dist/transactions/account-set.js +59 -0
  68. package/dist/transactions/account-set.js.map +1 -0
  69. package/dist/transactions/check-cancel.d.ts +16 -0
  70. package/dist/transactions/check-cancel.d.ts.map +1 -0
  71. package/dist/transactions/check-cancel.js +18 -0
  72. package/dist/transactions/check-cancel.js.map +1 -0
  73. package/dist/transactions/check-cash.d.ts +21 -0
  74. package/dist/transactions/check-cash.d.ts.map +1 -0
  75. package/dist/transactions/check-cash.js +29 -0
  76. package/dist/transactions/check-cash.js.map +1 -0
  77. package/dist/transactions/check-create.d.ts +27 -0
  78. package/dist/transactions/check-create.d.ts.map +1 -0
  79. package/dist/transactions/check-create.js +35 -0
  80. package/dist/transactions/check-create.js.map +1 -0
  81. package/dist/transactions/clawback.d.ts +20 -0
  82. package/dist/transactions/clawback.d.ts.map +1 -0
  83. package/dist/transactions/clawback.js +20 -0
  84. package/dist/transactions/clawback.js.map +1 -0
  85. package/dist/transactions/delegate-set.d.ts +18 -0
  86. package/dist/transactions/delegate-set.d.ts.map +1 -0
  87. package/dist/transactions/delegate-set.js +22 -0
  88. package/dist/transactions/delegate-set.js.map +1 -0
  89. package/dist/transactions/deposit-preauth.d.ts +18 -0
  90. package/dist/transactions/deposit-preauth.d.ts.map +1 -0
  91. package/dist/transactions/deposit-preauth.js +26 -0
  92. package/dist/transactions/deposit-preauth.js.map +1 -0
  93. package/dist/transactions/did-delete.d.ts +13 -0
  94. package/dist/transactions/did-delete.d.ts.map +1 -0
  95. package/dist/transactions/did-delete.js +9 -0
  96. package/dist/transactions/did-delete.js.map +1 -0
  97. package/dist/transactions/did-set.d.ts +20 -0
  98. package/dist/transactions/did-set.d.ts.map +1 -0
  99. package/dist/transactions/did-set.js +24 -0
  100. package/dist/transactions/did-set.js.map +1 -0
  101. package/dist/transactions/escrow-cancel.d.ts +18 -0
  102. package/dist/transactions/escrow-cancel.d.ts.map +1 -0
  103. package/dist/transactions/escrow-cancel.js +22 -0
  104. package/dist/transactions/escrow-cancel.js.map +1 -0
  105. package/dist/transactions/escrow-create.d.ts +29 -0
  106. package/dist/transactions/escrow-create.d.ts.map +1 -0
  107. package/dist/transactions/escrow-create.js +40 -0
  108. package/dist/transactions/escrow-create.js.map +1 -0
  109. package/dist/transactions/escrow-finish.d.ts +22 -0
  110. package/dist/transactions/escrow-finish.d.ts.map +1 -0
  111. package/dist/transactions/escrow-finish.js +29 -0
  112. package/dist/transactions/escrow-finish.js.map +1 -0
  113. package/dist/transactions/mptoken-authorize.d.ts +22 -0
  114. package/dist/transactions/mptoken-authorize.d.ts.map +1 -0
  115. package/dist/transactions/mptoken-authorize.js +24 -0
  116. package/dist/transactions/mptoken-authorize.js.map +1 -0
  117. package/dist/transactions/mptoken-issuance-create.d.ts +23 -0
  118. package/dist/transactions/mptoken-issuance-create.d.ts.map +1 -0
  119. package/dist/transactions/mptoken-issuance-create.js +29 -0
  120. package/dist/transactions/mptoken-issuance-create.js.map +1 -0
  121. package/dist/transactions/mptoken-issuance-destroy.d.ts +17 -0
  122. package/dist/transactions/mptoken-issuance-destroy.d.ts.map +1 -0
  123. package/dist/transactions/mptoken-issuance-destroy.js +19 -0
  124. package/dist/transactions/mptoken-issuance-destroy.js.map +1 -0
  125. package/dist/transactions/mptoken-issuance-set.d.ts +19 -0
  126. package/dist/transactions/mptoken-issuance-set.d.ts.map +1 -0
  127. package/dist/transactions/mptoken-issuance-set.js +24 -0
  128. package/dist/transactions/mptoken-issuance-set.js.map +1 -0
  129. package/dist/transactions/nftoken-accept-offer.d.ts +22 -0
  130. package/dist/transactions/nftoken-accept-offer.d.ts.map +1 -0
  131. package/dist/transactions/nftoken-accept-offer.js +28 -0
  132. package/dist/transactions/nftoken-accept-offer.js.map +1 -0
  133. package/dist/transactions/nftoken-burn.d.ts +19 -0
  134. package/dist/transactions/nftoken-burn.d.ts.map +1 -0
  135. package/dist/transactions/nftoken-burn.js +24 -0
  136. package/dist/transactions/nftoken-burn.js.map +1 -0
  137. package/dist/transactions/nftoken-cancel-offer.d.ts +17 -0
  138. package/dist/transactions/nftoken-cancel-offer.d.ts.map +1 -0
  139. package/dist/transactions/nftoken-cancel-offer.js +21 -0
  140. package/dist/transactions/nftoken-cancel-offer.js.map +1 -0
  141. package/dist/transactions/nftoken-create-offer.d.ts +29 -0
  142. package/dist/transactions/nftoken-create-offer.d.ts.map +1 -0
  143. package/dist/transactions/nftoken-create-offer.js +34 -0
  144. package/dist/transactions/nftoken-create-offer.js.map +1 -0
  145. package/dist/transactions/nftoken-mint.d.ts +26 -0
  146. package/dist/transactions/nftoken-mint.d.ts.map +1 -0
  147. package/dist/transactions/nftoken-mint.js +34 -0
  148. package/dist/transactions/nftoken-mint.js.map +1 -0
  149. package/dist/transactions/nftoken-modify.d.ts +21 -0
  150. package/dist/transactions/nftoken-modify.d.ts.map +1 -0
  151. package/dist/transactions/nftoken-modify.js +27 -0
  152. package/dist/transactions/nftoken-modify.js.map +1 -0
  153. package/dist/transactions/offer-cancel.d.ts +16 -0
  154. package/dist/transactions/offer-cancel.d.ts.map +1 -0
  155. package/dist/transactions/offer-cancel.js +19 -0
  156. package/dist/transactions/offer-cancel.js.map +1 -0
  157. package/dist/transactions/offer-create.d.ts +29 -0
  158. package/dist/transactions/offer-create.d.ts.map +1 -0
  159. package/dist/transactions/offer-create.js +47 -0
  160. package/dist/transactions/offer-create.js.map +1 -0
  161. package/dist/transactions/payment-channel-claim.d.ts +28 -0
  162. package/dist/transactions/payment-channel-claim.d.ts.map +1 -0
  163. package/dist/transactions/payment-channel-claim.js +31 -0
  164. package/dist/transactions/payment-channel-claim.js.map +1 -0
  165. package/dist/transactions/payment-channel-create.d.ts +29 -0
  166. package/dist/transactions/payment-channel-create.d.ts.map +1 -0
  167. package/dist/transactions/payment-channel-create.js +40 -0
  168. package/dist/transactions/payment-channel-create.js.map +1 -0
  169. package/dist/transactions/payment-channel-fund.d.ts +21 -0
  170. package/dist/transactions/payment-channel-fund.d.ts.map +1 -0
  171. package/dist/transactions/payment-channel-fund.js +26 -0
  172. package/dist/transactions/payment-channel-fund.js.map +1 -0
  173. package/dist/transactions/payment.d.ts +42 -0
  174. package/dist/transactions/payment.d.ts.map +1 -0
  175. package/dist/transactions/payment.js +66 -0
  176. package/dist/transactions/payment.js.map +1 -0
  177. package/dist/transactions/set-regular-key.d.ts +16 -0
  178. package/dist/transactions/set-regular-key.d.ts.map +1 -0
  179. package/dist/transactions/set-regular-key.js +19 -0
  180. package/dist/transactions/set-regular-key.js.map +1 -0
  181. package/dist/transactions/signer-list-set.d.ts +19 -0
  182. package/dist/transactions/signer-list-set.d.ts.map +1 -0
  183. package/dist/transactions/signer-list-set.js +35 -0
  184. package/dist/transactions/signer-list-set.js.map +1 -0
  185. package/dist/transactions/ticket-create.d.ts +16 -0
  186. package/dist/transactions/ticket-create.d.ts.map +1 -0
  187. package/dist/transactions/ticket-create.js +18 -0
  188. package/dist/transactions/ticket-create.js.map +1 -0
  189. package/dist/transactions/trust-set.d.ts +25 -0
  190. package/dist/transactions/trust-set.d.ts.map +1 -0
  191. package/dist/transactions/trust-set.js +29 -0
  192. package/dist/transactions/trust-set.js.map +1 -0
  193. package/dist/types/amounts.d.ts +49 -0
  194. package/dist/types/amounts.d.ts.map +1 -0
  195. package/dist/types/amounts.js +8 -0
  196. package/dist/types/amounts.js.map +1 -0
  197. package/dist/types/base.d.ts +96 -0
  198. package/dist/types/base.d.ts.map +1 -0
  199. package/dist/types/base.js +2 -0
  200. package/dist/types/base.js.map +1 -0
  201. package/dist/types/common.d.ts +81 -0
  202. package/dist/types/common.d.ts.map +1 -0
  203. package/dist/types/common.js +5 -0
  204. package/dist/types/common.js.map +1 -0
  205. package/dist/types/flags.d.ts +180 -0
  206. package/dist/types/flags.d.ts.map +1 -0
  207. package/dist/types/flags.js +132 -0
  208. package/dist/types/flags.js.map +1 -0
  209. package/dist/types/index.d.ts +10 -0
  210. package/dist/types/index.d.ts.map +1 -0
  211. package/dist/types/index.js +2 -0
  212. package/dist/types/index.js.map +1 -0
  213. package/dist/types/transaction-types.d.ts +7 -0
  214. package/dist/types/transaction-types.d.ts.map +1 -0
  215. package/dist/types/transaction-types.js +2 -0
  216. package/dist/types/transaction-types.js.map +1 -0
  217. package/dist/validation/base.d.ts +8 -0
  218. package/dist/validation/base.d.ts.map +1 -0
  219. package/dist/validation/base.js +79 -0
  220. package/dist/validation/base.js.map +1 -0
  221. package/dist/validation/helpers.d.ts +42 -0
  222. package/dist/validation/helpers.d.ts.map +1 -0
  223. package/dist/validation/helpers.js +154 -0
  224. package/dist/validation/helpers.js.map +1 -0
  225. package/dist/validation/index.d.ts +3 -0
  226. package/dist/validation/index.d.ts.map +1 -0
  227. package/dist/validation/index.js +3 -0
  228. package/dist/validation/index.js.map +1 -0
  229. package/package.json +54 -0
@@ -0,0 +1,16 @@
1
+ /**
2
+ * CheckCancel transaction — cancel an unredeemed check.
3
+ */
4
+ import type { BaseTransactionFields } from '../types/base.js';
5
+ import { Transaction } from '../transaction.js';
6
+ export interface CheckCancelTxFields extends BaseTransactionFields {
7
+ readonly TransactionType: 'CheckCancel';
8
+ readonly CheckID: string;
9
+ }
10
+ export declare class CheckCancelTx extends Transaction {
11
+ readonly TransactionType: "CheckCancel";
12
+ readonly CheckID: string;
13
+ constructor(props: CheckCancelTxFields | Record<string, unknown>);
14
+ validate(): void;
15
+ }
16
+ //# sourceMappingURL=check-cancel.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"check-cancel.d.ts","sourceRoot":"","sources":["../../src/transactions/check-cancel.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,kBAAkB,CAAC;AAC9D,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAIhD,MAAM,WAAW,mBAAoB,SAAQ,qBAAqB;IAChE,QAAQ,CAAC,eAAe,EAAE,aAAa,CAAC;IACxC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;CAC1B;AAED,qBAAa,aAAc,SAAQ,WAAW;IAC5C,SAAkB,eAAe,EAAG,aAAa,CAAU;IAC3D,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;gBAEb,KAAK,EAAE,mBAAmB,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IAMvD,QAAQ,IAAI,IAAI;CAI1B"}
@@ -0,0 +1,18 @@
1
+ import { Transaction } from '../transaction.js';
2
+ import { ValidationError } from '../errors.js';
3
+ import { isString } from '../validation/helpers.js';
4
+ export class CheckCancelTx extends Transaction {
5
+ TransactionType = 'CheckCancel';
6
+ CheckID;
7
+ constructor(props) {
8
+ const p = props;
9
+ super({ ...p, TransactionType: 'CheckCancel' });
10
+ this.CheckID = p['CheckID'];
11
+ }
12
+ validate() {
13
+ super.validate();
14
+ if (!isString(this.CheckID))
15
+ throw new ValidationError('CheckCancel: missing CheckID');
16
+ }
17
+ }
18
+ //# sourceMappingURL=check-cancel.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"check-cancel.js","sourceRoot":"","sources":["../../src/transactions/check-cancel.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAOpD,MAAM,OAAO,aAAc,SAAQ,WAAW;IAC1B,eAAe,GAAG,aAAsB,CAAC;IAClD,OAAO,CAAS;IAEzB,YAAY,KAAoD;QAC9D,MAAM,CAAC,GAAG,KAAgC,CAAC;QAC3C,KAAK,CAAC,EAAE,GAAG,CAAC,EAAE,eAAe,EAAE,aAAa,EAA2B,CAAC,CAAC;QACzE,IAAI,CAAC,OAAO,GAAG,CAAC,CAAC,SAAS,CAAW,CAAC;IACxC,CAAC;IAEQ,QAAQ;QACf,KAAK,CAAC,QAAQ,EAAE,CAAC;QACjB,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC;YAAE,MAAM,IAAI,eAAe,CAAC,8BAA8B,CAAC,CAAC;IACzF,CAAC;CACF"}
@@ -0,0 +1,21 @@
1
+ /**
2
+ * CheckCash transaction — redeem a check.
3
+ */
4
+ import type { Amount } from '../types/amounts.js';
5
+ import type { BaseTransactionFields } from '../types/base.js';
6
+ import { Transaction } from '../transaction.js';
7
+ export interface CheckCashTxFields extends BaseTransactionFields {
8
+ readonly TransactionType: 'CheckCash';
9
+ readonly CheckID: string;
10
+ readonly Amount?: Amount;
11
+ readonly DeliverMin?: Amount;
12
+ }
13
+ export declare class CheckCashTx extends Transaction {
14
+ readonly TransactionType: "CheckCash";
15
+ readonly CheckID: string;
16
+ readonly Amount?: Amount;
17
+ readonly DeliverMin?: Amount;
18
+ constructor(props: CheckCashTxFields | Record<string, unknown>);
19
+ validate(): void;
20
+ }
21
+ //# sourceMappingURL=check-cash.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"check-cash.d.ts","sourceRoot":"","sources":["../../src/transactions/check-cash.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAClD,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,kBAAkB,CAAC;AAC9D,OAAO,EAAE,WAAW,EAAiB,MAAM,mBAAmB,CAAC;AAI/D,MAAM,WAAW,iBAAkB,SAAQ,qBAAqB;IAC9D,QAAQ,CAAC,eAAe,EAAE,WAAW,CAAC;IACtC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,CAAC;CAC9B;AAED,qBAAa,WAAY,SAAQ,WAAW;IAC1C,SAAkB,eAAe,EAAG,WAAW,CAAU;IACzD,QAAQ,CAAC,OAAO,EAAG,MAAM,CAAC;IAC1B,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,CAAC;gBAEjB,KAAK,EAAE,iBAAiB,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IAOrD,QAAQ,IAAI,IAAI;CAY1B"}
@@ -0,0 +1,29 @@
1
+ import { Transaction, assignDefined } from '../transaction.js';
2
+ import { ValidationError } from '../errors.js';
3
+ import { isAmount, isString } from '../validation/helpers.js';
4
+ export class CheckCashTx extends Transaction {
5
+ TransactionType = 'CheckCash';
6
+ CheckID;
7
+ Amount;
8
+ DeliverMin;
9
+ constructor(props) {
10
+ const p = props;
11
+ super({ ...p, TransactionType: 'CheckCash' });
12
+ this.CheckID = p['CheckID'];
13
+ assignDefined(this, p, ['Amount', 'DeliverMin']);
14
+ }
15
+ validate() {
16
+ super.validate();
17
+ if (!isString(this.CheckID))
18
+ throw new ValidationError('CheckCash: missing CheckID');
19
+ if (this.Amount === undefined && this.DeliverMin === undefined)
20
+ throw new ValidationError('CheckCash: must have Amount or DeliverMin');
21
+ if (this.Amount !== undefined && this.DeliverMin !== undefined)
22
+ throw new ValidationError('CheckCash: cannot have both Amount and DeliverMin');
23
+ if (this.Amount !== undefined && !isAmount(this.Amount))
24
+ throw new ValidationError('CheckCash: invalid Amount');
25
+ if (this.DeliverMin !== undefined && !isAmount(this.DeliverMin))
26
+ throw new ValidationError('CheckCash: invalid DeliverMin');
27
+ }
28
+ }
29
+ //# sourceMappingURL=check-cash.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"check-cash.js","sourceRoot":"","sources":["../../src/transactions/check-cash.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAC/D,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAS9D,MAAM,OAAO,WAAY,SAAQ,WAAW;IACxB,eAAe,GAAG,WAAoB,CAAC;IAChD,OAAO,CAAU;IACjB,MAAM,CAAU;IAChB,UAAU,CAAU;IAE7B,YAAY,KAAkD;QAC5D,MAAM,CAAC,GAAG,KAAgC,CAAC;QAC3C,KAAK,CAAC,EAAE,GAAG,CAAC,EAAE,eAAe,EAAE,WAAW,EAA2B,CAAC,CAAC;QACvE,IAAI,CAAC,OAAO,GAAG,CAAC,CAAC,SAAS,CAAW,CAAC;QACtC,aAAa,CAAC,IAAI,EAAE,CAAC,EAAE,CAAC,QAAQ,EAAE,YAAY,CAAC,CAAC,CAAC;IACnD,CAAC;IAEQ,QAAQ;QACf,KAAK,CAAC,QAAQ,EAAE,CAAC;QACjB,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC;YAAE,MAAM,IAAI,eAAe,CAAC,4BAA4B,CAAC,CAAC;QACrF,IAAI,IAAI,CAAC,MAAM,KAAK,SAAS,IAAI,IAAI,CAAC,UAAU,KAAK,SAAS;YAC5D,MAAM,IAAI,eAAe,CAAC,2CAA2C,CAAC,CAAC;QACzE,IAAI,IAAI,CAAC,MAAM,KAAK,SAAS,IAAI,IAAI,CAAC,UAAU,KAAK,SAAS;YAC5D,MAAM,IAAI,eAAe,CAAC,mDAAmD,CAAC,CAAC;QACjF,IAAI,IAAI,CAAC,MAAM,KAAK,SAAS,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC;YACrD,MAAM,IAAI,eAAe,CAAC,2BAA2B,CAAC,CAAC;QACzD,IAAI,IAAI,CAAC,UAAU,KAAK,SAAS,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,UAAU,CAAC;YAC7D,MAAM,IAAI,eAAe,CAAC,+BAA+B,CAAC,CAAC;IAC/D,CAAC;CACF"}
@@ -0,0 +1,27 @@
1
+ /**
2
+ * CheckCreate transaction — create a deferred payment (check).
3
+ */
4
+ import type { Amount } from '../types/amounts.js';
5
+ import type { BaseTransactionFields } from '../types/base.js';
6
+ import { PaymentTransaction } from '../groups/payment.js';
7
+ export interface CheckCreateTxFields extends BaseTransactionFields {
8
+ readonly TransactionType: 'CheckCreate';
9
+ readonly Destination: string;
10
+ readonly SendMax: Amount;
11
+ readonly DestinationTag?: number;
12
+ readonly Expiration?: number;
13
+ readonly InvoiceID?: string;
14
+ }
15
+ export declare class CheckCreateTx extends PaymentTransaction {
16
+ readonly TransactionType: "CheckCreate";
17
+ readonly Destination: string;
18
+ readonly SendMax: Amount;
19
+ readonly DestinationTag?: number;
20
+ readonly Expiration?: number;
21
+ readonly InvoiceID?: string;
22
+ constructor(props: CheckCreateTxFields | Record<string, unknown>);
23
+ getAmount(): Amount;
24
+ getDestination(): string;
25
+ validate(): void;
26
+ }
27
+ //# sourceMappingURL=check-create.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"check-create.d.ts","sourceRoot":"","sources":["../../src/transactions/check-create.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAClD,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,kBAAkB,CAAC;AAC9D,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAK1D,MAAM,WAAW,mBAAoB,SAAQ,qBAAqB;IAChE,QAAQ,CAAC,eAAe,EAAE,aAAa,CAAC;IACxC,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,cAAc,CAAC,EAAE,MAAM,CAAC;IACjC,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;CAC7B;AAED,qBAAa,aAAc,SAAQ,kBAAkB;IACnD,SAAkB,eAAe,EAAG,aAAa,CAAU;IAC3D,QAAQ,CAAC,WAAW,EAAG,MAAM,CAAC;IAC9B,QAAQ,CAAC,OAAO,EAAG,MAAM,CAAC;IAC1B,QAAQ,CAAC,cAAc,CAAC,EAAE,MAAM,CAAC;IACjC,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;gBAEhB,KAAK,EAAE,mBAAmB,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IAQvD,SAAS,IAAI,MAAM;IACnB,cAAc,IAAI,MAAM;IAExB,QAAQ,IAAI,IAAI;CAW1B"}
@@ -0,0 +1,35 @@
1
+ import { PaymentTransaction } from '../groups/payment.js';
2
+ import { assignDefined } from '../transaction.js';
3
+ import { ValidationError } from '../errors.js';
4
+ import { isAmount, isAccount, isNumber, isString } from '../validation/helpers.js';
5
+ export class CheckCreateTx extends PaymentTransaction {
6
+ TransactionType = 'CheckCreate';
7
+ Destination;
8
+ SendMax;
9
+ DestinationTag;
10
+ Expiration;
11
+ InvoiceID;
12
+ constructor(props) {
13
+ const p = props;
14
+ super({ ...p, TransactionType: 'CheckCreate' });
15
+ this.Destination = p['Destination'];
16
+ this.SendMax = p['SendMax'];
17
+ assignDefined(this, p, ['DestinationTag', 'Expiration', 'InvoiceID']);
18
+ }
19
+ getAmount() { return this.SendMax; }
20
+ getDestination() { return this.Destination; }
21
+ validate() {
22
+ super.validate();
23
+ if (!isAccount(this.Destination))
24
+ throw new ValidationError('CheckCreate: invalid Destination');
25
+ if (!isAmount(this.SendMax))
26
+ throw new ValidationError('CheckCreate: invalid SendMax');
27
+ if (this.DestinationTag !== undefined && !isNumber(this.DestinationTag))
28
+ throw new ValidationError('CheckCreate: DestinationTag must be a number');
29
+ if (this.Expiration !== undefined && !isNumber(this.Expiration))
30
+ throw new ValidationError('CheckCreate: Expiration must be a number');
31
+ if (this.InvoiceID !== undefined && !isString(this.InvoiceID))
32
+ throw new ValidationError('CheckCreate: InvoiceID must be a string');
33
+ }
34
+ }
35
+ //# sourceMappingURL=check-create.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"check-create.js","sourceRoot":"","sources":["../../src/transactions/check-create.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAClD,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAWnF,MAAM,OAAO,aAAc,SAAQ,kBAAkB;IACjC,eAAe,GAAG,aAAsB,CAAC;IAClD,WAAW,CAAU;IACrB,OAAO,CAAU;IACjB,cAAc,CAAU;IACxB,UAAU,CAAU;IACpB,SAAS,CAAU;IAE5B,YAAY,KAAoD;QAC9D,MAAM,CAAC,GAAG,KAAgC,CAAC;QAC3C,KAAK,CAAC,EAAE,GAAG,CAAC,EAAE,eAAe,EAAE,aAAa,EAA2B,CAAC,CAAC;QACzE,IAAI,CAAC,WAAW,GAAG,CAAC,CAAC,aAAa,CAAW,CAAC;QAC9C,IAAI,CAAC,OAAO,GAAG,CAAC,CAAC,SAAS,CAAW,CAAC;QACtC,aAAa,CAAC,IAAI,EAAE,CAAC,EAAE,CAAC,gBAAgB,EAAE,YAAY,EAAE,WAAW,CAAC,CAAC,CAAC;IACxE,CAAC;IAEQ,SAAS,KAAa,OAAO,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC;IAC5C,cAAc,KAAa,OAAO,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC;IAErD,QAAQ;QACf,KAAK,CAAC,QAAQ,EAAE,CAAC;QACjB,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,WAAW,CAAC;YAAE,MAAM,IAAI,eAAe,CAAC,kCAAkC,CAAC,CAAC;QAChG,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC;YAAE,MAAM,IAAI,eAAe,CAAC,8BAA8B,CAAC,CAAC;QACvF,IAAI,IAAI,CAAC,cAAc,KAAK,SAAS,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,cAAc,CAAC;YACrE,MAAM,IAAI,eAAe,CAAC,8CAA8C,CAAC,CAAC;QAC5E,IAAI,IAAI,CAAC,UAAU,KAAK,SAAS,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,UAAU,CAAC;YAC7D,MAAM,IAAI,eAAe,CAAC,0CAA0C,CAAC,CAAC;QACxE,IAAI,IAAI,CAAC,SAAS,KAAK,SAAS,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,SAAS,CAAC;YAC3D,MAAM,IAAI,eAAe,CAAC,yCAAyC,CAAC,CAAC;IACzE,CAAC;CACF"}
@@ -0,0 +1,20 @@
1
+ /**
2
+ * Clawback transaction — claw back issued tokens.
3
+ */
4
+ import type { ClawbackAmount } from '../types/amounts.js';
5
+ import type { BaseTransactionFields } from '../types/base.js';
6
+ import type { ClawbackFlagsInterface } from '../types/flags.js';
7
+ import { AccountTransaction } from '../groups/account.js';
8
+ export interface ClawbackTxFields extends BaseTransactionFields {
9
+ readonly TransactionType: 'Clawback';
10
+ readonly Amount: ClawbackAmount;
11
+ readonly Flags?: number | ClawbackFlagsInterface;
12
+ }
13
+ export declare class ClawbackTx extends AccountTransaction {
14
+ readonly TransactionType: "Clawback";
15
+ readonly Amount: ClawbackAmount;
16
+ readonly Flags?: number | ClawbackFlagsInterface;
17
+ constructor(props: ClawbackTxFields | Record<string, unknown>);
18
+ validate(): void;
19
+ }
20
+ //# sourceMappingURL=clawback.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"clawback.d.ts","sourceRoot":"","sources":["../../src/transactions/clawback.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAC1D,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,kBAAkB,CAAC;AAC9D,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,mBAAmB,CAAC;AAChE,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAK1D,MAAM,WAAW,gBAAiB,SAAQ,qBAAqB;IAC7D,QAAQ,CAAC,eAAe,EAAE,UAAU,CAAC;IACrC,QAAQ,CAAC,MAAM,EAAE,cAAc,CAAC;IAChC,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,GAAG,sBAAsB,CAAC;CAClD;AAED,qBAAa,UAAW,SAAQ,kBAAkB;IAChD,SAAkB,eAAe,EAAG,UAAU,CAAU;IACxD,QAAQ,CAAC,MAAM,EAAG,cAAc,CAAC;IACjC,SAAiB,KAAK,CAAC,EAAE,MAAM,GAAG,sBAAsB,CAAC;gBAE7C,KAAK,EAAE,gBAAgB,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IAOpD,QAAQ,IAAI,IAAI;CAK1B"}
@@ -0,0 +1,20 @@
1
+ import { AccountTransaction } from '../groups/account.js';
2
+ import { assignDefined } from '../transaction.js';
3
+ import { ValidationError } from '../errors.js';
4
+ import { isClawbackAmount } from '../validation/helpers.js';
5
+ export class ClawbackTx extends AccountTransaction {
6
+ TransactionType = 'Clawback';
7
+ Amount;
8
+ constructor(props) {
9
+ const p = props;
10
+ super({ ...p, TransactionType: 'Clawback' });
11
+ this.Amount = p['Amount'];
12
+ assignDefined(this, p, ['Flags']);
13
+ }
14
+ validate() {
15
+ super.validate();
16
+ if (!isClawbackAmount(this.Amount))
17
+ throw new ValidationError('Clawback: invalid Amount (must be IssuedCurrency or MPT)');
18
+ }
19
+ }
20
+ //# sourceMappingURL=clawback.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"clawback.js","sourceRoot":"","sources":["../../src/transactions/clawback.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAClD,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAQ5D,MAAM,OAAO,UAAW,SAAQ,kBAAkB;IAC9B,eAAe,GAAG,UAAmB,CAAC;IAC/C,MAAM,CAAkB;IAGjC,YAAY,KAAiD;QAC3D,MAAM,CAAC,GAAG,KAAgC,CAAC;QAC3C,KAAK,CAAC,EAAE,GAAG,CAAC,EAAE,eAAe,EAAE,UAAU,EAA2B,CAAC,CAAC;QACtE,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC,QAAQ,CAAmB,CAAC;QAC5C,aAAa,CAAC,IAAI,EAAE,CAAC,EAAE,CAAC,OAAO,CAAC,CAAC,CAAC;IACpC,CAAC;IAEQ,QAAQ;QACf,KAAK,CAAC,QAAQ,EAAE,CAAC;QACjB,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,MAAM,CAAC;YAChC,MAAM,IAAI,eAAe,CAAC,0DAA0D,CAAC,CAAC;IAC1F,CAAC;CACF"}
@@ -0,0 +1,18 @@
1
+ /**
2
+ * DelegateSet transaction — assign delegate permissions.
3
+ */
4
+ import type { BaseTransactionFields } from '../types/base.js';
5
+ import { AccountTransaction } from '../groups/account.js';
6
+ export interface DelegateSetTxFields extends BaseTransactionFields {
7
+ readonly TransactionType: 'DelegateSet';
8
+ readonly Authorize?: string;
9
+ readonly Unauthorize?: string;
10
+ }
11
+ export declare class DelegateSetTx extends AccountTransaction {
12
+ readonly TransactionType: "DelegateSet";
13
+ readonly Authorize?: string;
14
+ readonly Unauthorize?: string;
15
+ constructor(props: DelegateSetTxFields | Record<string, unknown>);
16
+ validate(): void;
17
+ }
18
+ //# sourceMappingURL=delegate-set.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"delegate-set.d.ts","sourceRoot":"","sources":["../../src/transactions/delegate-set.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,kBAAkB,CAAC;AAC9D,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAK1D,MAAM,WAAW,mBAAoB,SAAQ,qBAAqB;IAChE,QAAQ,CAAC,eAAe,EAAE,aAAa,CAAC;IACxC,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;CAC/B;AAED,qBAAa,aAAc,SAAQ,kBAAkB;IACnD,SAAkB,eAAe,EAAG,aAAa,CAAU;IAC3D,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;gBAElB,KAAK,EAAE,mBAAmB,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IAMvD,QAAQ,IAAI,IAAI;CAO1B"}
@@ -0,0 +1,22 @@
1
+ import { AccountTransaction } from '../groups/account.js';
2
+ import { assignDefined } from '../transaction.js';
3
+ import { ValidationError } from '../errors.js';
4
+ import { isAccount } from '../validation/helpers.js';
5
+ export class DelegateSetTx extends AccountTransaction {
6
+ TransactionType = 'DelegateSet';
7
+ Authorize;
8
+ Unauthorize;
9
+ constructor(props) {
10
+ const p = props;
11
+ super({ ...p, TransactionType: 'DelegateSet' });
12
+ assignDefined(this, p, ['Authorize', 'Unauthorize']);
13
+ }
14
+ validate() {
15
+ super.validate();
16
+ if (this.Authorize !== undefined && !isAccount(this.Authorize))
17
+ throw new ValidationError('DelegateSet: invalid Authorize');
18
+ if (this.Unauthorize !== undefined && !isAccount(this.Unauthorize))
19
+ throw new ValidationError('DelegateSet: invalid Unauthorize');
20
+ }
21
+ }
22
+ //# sourceMappingURL=delegate-set.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"delegate-set.js","sourceRoot":"","sources":["../../src/transactions/delegate-set.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAClD,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AAQrD,MAAM,OAAO,aAAc,SAAQ,kBAAkB;IACjC,eAAe,GAAG,aAAsB,CAAC;IAClD,SAAS,CAAU;IACnB,WAAW,CAAU;IAE9B,YAAY,KAAoD;QAC9D,MAAM,CAAC,GAAG,KAAgC,CAAC;QAC3C,KAAK,CAAC,EAAE,GAAG,CAAC,EAAE,eAAe,EAAE,aAAa,EAA2B,CAAC,CAAC;QACzE,aAAa,CAAC,IAAI,EAAE,CAAC,EAAE,CAAC,WAAW,EAAE,aAAa,CAAC,CAAC,CAAC;IACvD,CAAC;IAEQ,QAAQ;QACf,KAAK,CAAC,QAAQ,EAAE,CAAC;QACjB,IAAI,IAAI,CAAC,SAAS,KAAK,SAAS,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,SAAS,CAAC;YAC5D,MAAM,IAAI,eAAe,CAAC,gCAAgC,CAAC,CAAC;QAC9D,IAAI,IAAI,CAAC,WAAW,KAAK,SAAS,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,WAAW,CAAC;YAChE,MAAM,IAAI,eAAe,CAAC,kCAAkC,CAAC,CAAC;IAClE,CAAC;CACF"}
@@ -0,0 +1,18 @@
1
+ /**
2
+ * DepositPreauth transaction — preauthorize an account for deposits.
3
+ */
4
+ import type { BaseTransactionFields } from '../types/base.js';
5
+ import { AccountTransaction } from '../groups/account.js';
6
+ export interface DepositPreauthTxFields extends BaseTransactionFields {
7
+ readonly TransactionType: 'DepositPreauth';
8
+ readonly Authorize?: string;
9
+ readonly Unauthorize?: string;
10
+ }
11
+ export declare class DepositPreauthTx extends AccountTransaction {
12
+ readonly TransactionType: "DepositPreauth";
13
+ readonly Authorize?: string;
14
+ readonly Unauthorize?: string;
15
+ constructor(props: DepositPreauthTxFields | Record<string, unknown>);
16
+ validate(): void;
17
+ }
18
+ //# sourceMappingURL=deposit-preauth.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"deposit-preauth.d.ts","sourceRoot":"","sources":["../../src/transactions/deposit-preauth.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,kBAAkB,CAAC;AAC9D,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAK1D,MAAM,WAAW,sBAAuB,SAAQ,qBAAqB;IACnE,QAAQ,CAAC,eAAe,EAAE,gBAAgB,CAAC;IAC3C,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;CAC/B;AAED,qBAAa,gBAAiB,SAAQ,kBAAkB;IACtD,SAAkB,eAAe,EAAG,gBAAgB,CAAU;IAC9D,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;gBAElB,KAAK,EAAE,sBAAsB,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IAM1D,QAAQ,IAAI,IAAI;CAW1B"}
@@ -0,0 +1,26 @@
1
+ import { AccountTransaction } from '../groups/account.js';
2
+ import { assignDefined } from '../transaction.js';
3
+ import { ValidationError } from '../errors.js';
4
+ import { isAccount } from '../validation/helpers.js';
5
+ export class DepositPreauthTx extends AccountTransaction {
6
+ TransactionType = 'DepositPreauth';
7
+ Authorize;
8
+ Unauthorize;
9
+ constructor(props) {
10
+ const p = props;
11
+ super({ ...p, TransactionType: 'DepositPreauth' });
12
+ assignDefined(this, p, ['Authorize', 'Unauthorize']);
13
+ }
14
+ validate() {
15
+ super.validate();
16
+ if (this.Authorize === undefined && this.Unauthorize === undefined)
17
+ throw new ValidationError('DepositPreauth: must have Authorize or Unauthorize');
18
+ if (this.Authorize !== undefined && this.Unauthorize !== undefined)
19
+ throw new ValidationError('DepositPreauth: cannot have both Authorize and Unauthorize');
20
+ if (this.Authorize !== undefined && !isAccount(this.Authorize))
21
+ throw new ValidationError('DepositPreauth: invalid Authorize');
22
+ if (this.Unauthorize !== undefined && !isAccount(this.Unauthorize))
23
+ throw new ValidationError('DepositPreauth: invalid Unauthorize');
24
+ }
25
+ }
26
+ //# sourceMappingURL=deposit-preauth.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"deposit-preauth.js","sourceRoot":"","sources":["../../src/transactions/deposit-preauth.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAClD,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AAQrD,MAAM,OAAO,gBAAiB,SAAQ,kBAAkB;IACpC,eAAe,GAAG,gBAAyB,CAAC;IACrD,SAAS,CAAU;IACnB,WAAW,CAAU;IAE9B,YAAY,KAAuD;QACjE,MAAM,CAAC,GAAG,KAAgC,CAAC;QAC3C,KAAK,CAAC,EAAE,GAAG,CAAC,EAAE,eAAe,EAAE,gBAAgB,EAA2B,CAAC,CAAC;QAC5E,aAAa,CAAC,IAAI,EAAE,CAAC,EAAE,CAAC,WAAW,EAAE,aAAa,CAAC,CAAC,CAAC;IACvD,CAAC;IAEQ,QAAQ;QACf,KAAK,CAAC,QAAQ,EAAE,CAAC;QACjB,IAAI,IAAI,CAAC,SAAS,KAAK,SAAS,IAAI,IAAI,CAAC,WAAW,KAAK,SAAS;YAChE,MAAM,IAAI,eAAe,CAAC,oDAAoD,CAAC,CAAC;QAClF,IAAI,IAAI,CAAC,SAAS,KAAK,SAAS,IAAI,IAAI,CAAC,WAAW,KAAK,SAAS;YAChE,MAAM,IAAI,eAAe,CAAC,4DAA4D,CAAC,CAAC;QAC1F,IAAI,IAAI,CAAC,SAAS,KAAK,SAAS,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,SAAS,CAAC;YAC5D,MAAM,IAAI,eAAe,CAAC,mCAAmC,CAAC,CAAC;QACjE,IAAI,IAAI,CAAC,WAAW,KAAK,SAAS,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,WAAW,CAAC;YAChE,MAAM,IAAI,eAAe,CAAC,qCAAqC,CAAC,CAAC;IACrE,CAAC;CACF"}
@@ -0,0 +1,13 @@
1
+ /**
2
+ * DIDDelete transaction — delete a DID document.
3
+ */
4
+ import type { BaseTransactionFields } from '../types/base.js';
5
+ import { Transaction } from '../transaction.js';
6
+ export interface DIDDeleteTxFields extends BaseTransactionFields {
7
+ readonly TransactionType: 'DIDDelete';
8
+ }
9
+ export declare class DIDDeleteTx extends Transaction {
10
+ readonly TransactionType: "DIDDelete";
11
+ constructor(props: DIDDeleteTxFields | Record<string, unknown>);
12
+ }
13
+ //# sourceMappingURL=did-delete.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"did-delete.d.ts","sourceRoot":"","sources":["../../src/transactions/did-delete.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,kBAAkB,CAAC;AAC9D,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAEhD,MAAM,WAAW,iBAAkB,SAAQ,qBAAqB;IAC9D,QAAQ,CAAC,eAAe,EAAE,WAAW,CAAC;CACvC;AAED,qBAAa,WAAY,SAAQ,WAAW;IAC1C,SAAkB,eAAe,EAAG,WAAW,CAAU;gBAE7C,KAAK,EAAE,iBAAiB,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;CAI/D"}
@@ -0,0 +1,9 @@
1
+ import { Transaction } from '../transaction.js';
2
+ export class DIDDeleteTx extends Transaction {
3
+ TransactionType = 'DIDDelete';
4
+ constructor(props) {
5
+ const p = props;
6
+ super({ ...p, TransactionType: 'DIDDelete' });
7
+ }
8
+ }
9
+ //# sourceMappingURL=did-delete.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"did-delete.js","sourceRoot":"","sources":["../../src/transactions/did-delete.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAMhD,MAAM,OAAO,WAAY,SAAQ,WAAW;IACxB,eAAe,GAAG,WAAoB,CAAC;IAEzD,YAAY,KAAkD;QAC5D,MAAM,CAAC,GAAG,KAAgC,CAAC;QAC3C,KAAK,CAAC,EAAE,GAAG,CAAC,EAAE,eAAe,EAAE,WAAW,EAA2B,CAAC,CAAC;IACzE,CAAC;CACF"}
@@ -0,0 +1,20 @@
1
+ /**
2
+ * DIDSet transaction — create or update a DID document.
3
+ */
4
+ import type { BaseTransactionFields } from '../types/base.js';
5
+ import { Transaction } from '../transaction.js';
6
+ export interface DIDSetTxFields extends BaseTransactionFields {
7
+ readonly TransactionType: 'DIDSet';
8
+ readonly Data?: string;
9
+ readonly DIDDocument?: string;
10
+ readonly URI?: string;
11
+ }
12
+ export declare class DIDSetTx extends Transaction {
13
+ readonly TransactionType: "DIDSet";
14
+ readonly Data?: string;
15
+ readonly DIDDocument?: string;
16
+ readonly URI?: string;
17
+ constructor(props: DIDSetTxFields | Record<string, unknown>);
18
+ validate(): void;
19
+ }
20
+ //# sourceMappingURL=did-set.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"did-set.d.ts","sourceRoot":"","sources":["../../src/transactions/did-set.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,kBAAkB,CAAC;AAC9D,OAAO,EAAE,WAAW,EAAiB,MAAM,mBAAmB,CAAC;AAI/D,MAAM,WAAW,cAAe,SAAQ,qBAAqB;IAC3D,QAAQ,CAAC,eAAe,EAAE,QAAQ,CAAC;IACnC,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,GAAG,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,qBAAa,QAAS,SAAQ,WAAW;IACvC,SAAkB,eAAe,EAAG,QAAQ,CAAU;IACtD,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,GAAG,CAAC,EAAE,MAAM,CAAC;gBAEV,KAAK,EAAE,cAAc,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IAMlD,QAAQ,IAAI,IAAI;CAS1B"}
@@ -0,0 +1,24 @@
1
+ import { Transaction, assignDefined } from '../transaction.js';
2
+ import { ValidationError } from '../errors.js';
3
+ import { isString } from '../validation/helpers.js';
4
+ export class DIDSetTx extends Transaction {
5
+ TransactionType = 'DIDSet';
6
+ Data;
7
+ DIDDocument;
8
+ URI;
9
+ constructor(props) {
10
+ const p = props;
11
+ super({ ...p, TransactionType: 'DIDSet' });
12
+ assignDefined(this, p, ['Data', 'DIDDocument', 'URI']);
13
+ }
14
+ validate() {
15
+ super.validate();
16
+ if (this.Data !== undefined && !isString(this.Data))
17
+ throw new ValidationError('DIDSet: Data must be a string');
18
+ if (this.DIDDocument !== undefined && !isString(this.DIDDocument))
19
+ throw new ValidationError('DIDSet: DIDDocument must be a string');
20
+ if (this.URI !== undefined && !isString(this.URI))
21
+ throw new ValidationError('DIDSet: URI must be a string');
22
+ }
23
+ }
24
+ //# sourceMappingURL=did-set.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"did-set.js","sourceRoot":"","sources":["../../src/transactions/did-set.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAC/D,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AASpD,MAAM,OAAO,QAAS,SAAQ,WAAW;IACrB,eAAe,GAAG,QAAiB,CAAC;IAC7C,IAAI,CAAU;IACd,WAAW,CAAU;IACrB,GAAG,CAAU;IAEtB,YAAY,KAA+C;QACzD,MAAM,CAAC,GAAG,KAAgC,CAAC;QAC3C,KAAK,CAAC,EAAE,GAAG,CAAC,EAAE,eAAe,EAAE,QAAQ,EAA2B,CAAC,CAAC;QACpE,aAAa,CAAC,IAAI,EAAE,CAAC,EAAE,CAAC,MAAM,EAAE,aAAa,EAAE,KAAK,CAAC,CAAC,CAAC;IACzD,CAAC;IAEQ,QAAQ;QACf,KAAK,CAAC,QAAQ,EAAE,CAAC;QACjB,IAAI,IAAI,CAAC,IAAI,KAAK,SAAS,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC;YACjD,MAAM,IAAI,eAAe,CAAC,+BAA+B,CAAC,CAAC;QAC7D,IAAI,IAAI,CAAC,WAAW,KAAK,SAAS,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC;YAC/D,MAAM,IAAI,eAAe,CAAC,sCAAsC,CAAC,CAAC;QACpE,IAAI,IAAI,CAAC,GAAG,KAAK,SAAS,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,GAAG,CAAC;YAC/C,MAAM,IAAI,eAAe,CAAC,8BAA8B,CAAC,CAAC;IAC9D,CAAC;CACF"}
@@ -0,0 +1,18 @@
1
+ /**
2
+ * EscrowCancel transaction — cancel a held payment.
3
+ */
4
+ import type { BaseTransactionFields } from '../types/base.js';
5
+ import { Transaction } from '../transaction.js';
6
+ export interface EscrowCancelTxFields extends BaseTransactionFields {
7
+ readonly TransactionType: 'EscrowCancel';
8
+ readonly Owner: string;
9
+ readonly OfferSequence: number;
10
+ }
11
+ export declare class EscrowCancelTx extends Transaction {
12
+ readonly TransactionType: "EscrowCancel";
13
+ readonly Owner: string;
14
+ readonly OfferSequence: number;
15
+ constructor(props: EscrowCancelTxFields | Record<string, unknown>);
16
+ validate(): void;
17
+ }
18
+ //# sourceMappingURL=escrow-cancel.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"escrow-cancel.d.ts","sourceRoot":"","sources":["../../src/transactions/escrow-cancel.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,kBAAkB,CAAC;AAC9D,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAIhD,MAAM,WAAW,oBAAqB,SAAQ,qBAAqB;IACjE,QAAQ,CAAC,eAAe,EAAE,cAAc,CAAC;IACzC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAC;CAChC;AAED,qBAAa,cAAe,SAAQ,WAAW;IAC7C,SAAkB,eAAe,EAAG,cAAc,CAAU;IAC5D,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAC;gBAEnB,KAAK,EAAE,oBAAoB,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IAOxD,QAAQ,IAAI,IAAI;CAK1B"}
@@ -0,0 +1,22 @@
1
+ import { Transaction } from '../transaction.js';
2
+ import { ValidationError } from '../errors.js';
3
+ import { isAccount, isNumber } from '../validation/helpers.js';
4
+ export class EscrowCancelTx extends Transaction {
5
+ TransactionType = 'EscrowCancel';
6
+ Owner;
7
+ OfferSequence;
8
+ constructor(props) {
9
+ const p = props;
10
+ super({ ...p, TransactionType: 'EscrowCancel' });
11
+ this.Owner = p['Owner'];
12
+ this.OfferSequence = p['OfferSequence'];
13
+ }
14
+ validate() {
15
+ super.validate();
16
+ if (!isAccount(this.Owner))
17
+ throw new ValidationError('EscrowCancel: invalid Owner');
18
+ if (!isNumber(this.OfferSequence))
19
+ throw new ValidationError('EscrowCancel: invalid OfferSequence');
20
+ }
21
+ }
22
+ //# sourceMappingURL=escrow-cancel.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"escrow-cancel.js","sourceRoot":"","sources":["../../src/transactions/escrow-cancel.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAQ/D,MAAM,OAAO,cAAe,SAAQ,WAAW;IAC3B,eAAe,GAAG,cAAuB,CAAC;IACnD,KAAK,CAAS;IACd,aAAa,CAAS;IAE/B,YAAY,KAAqD;QAC/D,MAAM,CAAC,GAAG,KAAgC,CAAC;QAC3C,KAAK,CAAC,EAAE,GAAG,CAAC,EAAE,eAAe,EAAE,cAAc,EAA2B,CAAC,CAAC;QAC1E,IAAI,CAAC,KAAK,GAAG,CAAC,CAAC,OAAO,CAAW,CAAC;QAClC,IAAI,CAAC,aAAa,GAAG,CAAC,CAAC,eAAe,CAAW,CAAC;IACpD,CAAC;IAEQ,QAAQ;QACf,KAAK,CAAC,QAAQ,EAAE,CAAC;QACjB,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,KAAK,CAAC;YAAE,MAAM,IAAI,eAAe,CAAC,6BAA6B,CAAC,CAAC;QACrF,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,aAAa,CAAC;YAAE,MAAM,IAAI,eAAe,CAAC,qCAAqC,CAAC,CAAC;IACtG,CAAC;CACF"}
@@ -0,0 +1,29 @@
1
+ /**
2
+ * EscrowCreate transaction — create a held payment.
3
+ */
4
+ import type { Amount } from '../types/amounts.js';
5
+ import type { BaseTransactionFields } from '../types/base.js';
6
+ import { PaymentTransaction } from '../groups/payment.js';
7
+ export interface EscrowCreateTxFields extends BaseTransactionFields {
8
+ readonly TransactionType: 'EscrowCreate';
9
+ readonly Amount: Amount;
10
+ readonly Destination: string;
11
+ readonly DestinationTag?: number;
12
+ readonly CancelAfter?: number;
13
+ readonly FinishAfter?: number;
14
+ readonly Condition?: string;
15
+ }
16
+ export declare class EscrowCreateTx extends PaymentTransaction {
17
+ readonly TransactionType: "EscrowCreate";
18
+ readonly Amount: Amount;
19
+ readonly Destination: string;
20
+ readonly DestinationTag?: number;
21
+ readonly CancelAfter?: number;
22
+ readonly FinishAfter?: number;
23
+ readonly Condition?: string;
24
+ constructor(props: EscrowCreateTxFields | Record<string, unknown>);
25
+ getAmount(): Amount;
26
+ getDestination(): string;
27
+ validate(): void;
28
+ }
29
+ //# sourceMappingURL=escrow-create.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"escrow-create.d.ts","sourceRoot":"","sources":["../../src/transactions/escrow-create.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAClD,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,kBAAkB,CAAC;AAC9D,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAK1D,MAAM,WAAW,oBAAqB,SAAQ,qBAAqB;IACjE,QAAQ,CAAC,eAAe,EAAE,cAAc,CAAC;IACzC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,cAAc,CAAC,EAAE,MAAM,CAAC;IACjC,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;CAC7B;AAED,qBAAa,cAAe,SAAQ,kBAAkB;IACpD,SAAkB,eAAe,EAAG,cAAc,CAAU;IAC5D,QAAQ,CAAC,MAAM,EAAG,MAAM,CAAC;IACzB,QAAQ,CAAC,WAAW,EAAG,MAAM,CAAC;IAC9B,QAAQ,CAAC,cAAc,CAAC,EAAE,MAAM,CAAC;IACjC,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;gBAEhB,KAAK,EAAE,oBAAoB,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IAQxD,SAAS,IAAI,MAAM;IACnB,cAAc,IAAI,MAAM;IAExB,QAAQ,IAAI,IAAI;CAe1B"}
@@ -0,0 +1,40 @@
1
+ import { PaymentTransaction } from '../groups/payment.js';
2
+ import { assignDefined } from '../transaction.js';
3
+ import { ValidationError } from '../errors.js';
4
+ import { isAmount, isAccount, isNumber, isString } from '../validation/helpers.js';
5
+ export class EscrowCreateTx extends PaymentTransaction {
6
+ TransactionType = 'EscrowCreate';
7
+ Amount;
8
+ Destination;
9
+ DestinationTag;
10
+ CancelAfter;
11
+ FinishAfter;
12
+ Condition;
13
+ constructor(props) {
14
+ const p = props;
15
+ super({ ...p, TransactionType: 'EscrowCreate' });
16
+ this.Amount = p['Amount'];
17
+ this.Destination = p['Destination'];
18
+ assignDefined(this, p, ['DestinationTag', 'CancelAfter', 'FinishAfter', 'Condition']);
19
+ }
20
+ getAmount() { return this.Amount; }
21
+ getDestination() { return this.Destination; }
22
+ validate() {
23
+ super.validate();
24
+ if (!isAmount(this.Amount))
25
+ throw new ValidationError('EscrowCreate: invalid Amount');
26
+ if (!isAccount(this.Destination))
27
+ throw new ValidationError('EscrowCreate: invalid Destination');
28
+ if (this.DestinationTag !== undefined && !isNumber(this.DestinationTag))
29
+ throw new ValidationError('EscrowCreate: DestinationTag must be a number');
30
+ if (this.CancelAfter !== undefined && !isNumber(this.CancelAfter))
31
+ throw new ValidationError('EscrowCreate: CancelAfter must be a number');
32
+ if (this.FinishAfter !== undefined && !isNumber(this.FinishAfter))
33
+ throw new ValidationError('EscrowCreate: FinishAfter must be a number');
34
+ if (this.Condition !== undefined && !isString(this.Condition))
35
+ throw new ValidationError('EscrowCreate: Condition must be a string');
36
+ if (this.CancelAfter === undefined && this.FinishAfter === undefined)
37
+ throw new ValidationError('EscrowCreate: must have CancelAfter or FinishAfter');
38
+ }
39
+ }
40
+ //# sourceMappingURL=escrow-create.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"escrow-create.js","sourceRoot":"","sources":["../../src/transactions/escrow-create.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAClD,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAYnF,MAAM,OAAO,cAAe,SAAQ,kBAAkB;IAClC,eAAe,GAAG,cAAuB,CAAC;IACnD,MAAM,CAAU;IAChB,WAAW,CAAU;IACrB,cAAc,CAAU;IACxB,WAAW,CAAU;IACrB,WAAW,CAAU;IACrB,SAAS,CAAU;IAE5B,YAAY,KAAqD;QAC/D,MAAM,CAAC,GAAG,KAAgC,CAAC;QAC3C,KAAK,CAAC,EAAE,GAAG,CAAC,EAAE,eAAe,EAAE,cAAc,EAA2B,CAAC,CAAC;QAC1E,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC,QAAQ,CAAW,CAAC;QACpC,IAAI,CAAC,WAAW,GAAG,CAAC,CAAC,aAAa,CAAW,CAAC;QAC9C,aAAa,CAAC,IAAI,EAAE,CAAC,EAAE,CAAC,gBAAgB,EAAE,aAAa,EAAE,aAAa,EAAE,WAAW,CAAC,CAAC,CAAC;IACxF,CAAC;IAEQ,SAAS,KAAa,OAAO,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC;IAC3C,cAAc,KAAa,OAAO,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC;IAErD,QAAQ;QACf,KAAK,CAAC,QAAQ,EAAE,CAAC;QACjB,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC;YAAE,MAAM,IAAI,eAAe,CAAC,8BAA8B,CAAC,CAAC;QACtF,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,WAAW,CAAC;YAAE,MAAM,IAAI,eAAe,CAAC,mCAAmC,CAAC,CAAC;QACjG,IAAI,IAAI,CAAC,cAAc,KAAK,SAAS,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,cAAc,CAAC;YACrE,MAAM,IAAI,eAAe,CAAC,+CAA+C,CAAC,CAAC;QAC7E,IAAI,IAAI,CAAC,WAAW,KAAK,SAAS,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC;YAC/D,MAAM,IAAI,eAAe,CAAC,4CAA4C,CAAC,CAAC;QAC1E,IAAI,IAAI,CAAC,WAAW,KAAK,SAAS,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC;YAC/D,MAAM,IAAI,eAAe,CAAC,4CAA4C,CAAC,CAAC;QAC1E,IAAI,IAAI,CAAC,SAAS,KAAK,SAAS,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,SAAS,CAAC;YAC3D,MAAM,IAAI,eAAe,CAAC,0CAA0C,CAAC,CAAC;QACxE,IAAI,IAAI,CAAC,WAAW,KAAK,SAAS,IAAI,IAAI,CAAC,WAAW,KAAK,SAAS;YAClE,MAAM,IAAI,eAAe,CAAC,oDAAoD,CAAC,CAAC;IACpF,CAAC;CACF"}
@@ -0,0 +1,22 @@
1
+ /**
2
+ * EscrowFinish transaction — release a held payment.
3
+ */
4
+ import type { BaseTransactionFields } from '../types/base.js';
5
+ import { Transaction } from '../transaction.js';
6
+ export interface EscrowFinishTxFields extends BaseTransactionFields {
7
+ readonly TransactionType: 'EscrowFinish';
8
+ readonly Owner: string;
9
+ readonly OfferSequence: number;
10
+ readonly Condition?: string;
11
+ readonly Fulfillment?: string;
12
+ }
13
+ export declare class EscrowFinishTx extends Transaction {
14
+ readonly TransactionType: "EscrowFinish";
15
+ readonly Owner: string;
16
+ readonly OfferSequence: number;
17
+ readonly Condition?: string;
18
+ readonly Fulfillment?: string;
19
+ constructor(props: EscrowFinishTxFields | Record<string, unknown>);
20
+ validate(): void;
21
+ }
22
+ //# sourceMappingURL=escrow-finish.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"escrow-finish.d.ts","sourceRoot":"","sources":["../../src/transactions/escrow-finish.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,kBAAkB,CAAC;AAC9D,OAAO,EAAE,WAAW,EAAiB,MAAM,mBAAmB,CAAC;AAI/D,MAAM,WAAW,oBAAqB,SAAQ,qBAAqB;IACjE,QAAQ,CAAC,eAAe,EAAE,cAAc,CAAC;IACzC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAC;IAC/B,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;CAC/B;AAED,qBAAa,cAAe,SAAQ,WAAW;IAC7C,SAAkB,eAAe,EAAG,cAAc,CAAU;IAC5D,QAAQ,CAAC,KAAK,EAAG,MAAM,CAAC;IACxB,QAAQ,CAAC,aAAa,EAAG,MAAM,CAAC;IAChC,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;gBAElB,KAAK,EAAE,oBAAoB,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IAQxD,QAAQ,IAAI,IAAI;CAS1B"}
@@ -0,0 +1,29 @@
1
+ import { Transaction, assignDefined } from '../transaction.js';
2
+ import { ValidationError } from '../errors.js';
3
+ import { isAccount, isNumber, isString } from '../validation/helpers.js';
4
+ export class EscrowFinishTx extends Transaction {
5
+ TransactionType = 'EscrowFinish';
6
+ Owner;
7
+ OfferSequence;
8
+ Condition;
9
+ Fulfillment;
10
+ constructor(props) {
11
+ const p = props;
12
+ super({ ...p, TransactionType: 'EscrowFinish' });
13
+ this.Owner = p['Owner'];
14
+ this.OfferSequence = p['OfferSequence'];
15
+ assignDefined(this, p, ['Condition', 'Fulfillment']);
16
+ }
17
+ validate() {
18
+ super.validate();
19
+ if (!isAccount(this.Owner))
20
+ throw new ValidationError('EscrowFinish: invalid Owner');
21
+ if (!isNumber(this.OfferSequence))
22
+ throw new ValidationError('EscrowFinish: invalid OfferSequence');
23
+ if (this.Condition !== undefined && !isString(this.Condition))
24
+ throw new ValidationError('EscrowFinish: Condition must be a string');
25
+ if (this.Fulfillment !== undefined && !isString(this.Fulfillment))
26
+ throw new ValidationError('EscrowFinish: Fulfillment must be a string');
27
+ }
28
+ }
29
+ //# sourceMappingURL=escrow-finish.js.map