@bsv/sdk 1.8.9 → 1.8.11

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 (90) hide show
  1. package/dist/cjs/package.json +1 -1
  2. package/dist/cjs/src/primitives/utils.js +19 -1
  3. package/dist/cjs/src/primitives/utils.js.map +1 -1
  4. package/dist/cjs/src/script/templates/P2PKH.js +2 -7
  5. package/dist/cjs/src/script/templates/P2PKH.js.map +1 -1
  6. package/dist/cjs/src/script/templates/PushDrop.js +3 -8
  7. package/dist/cjs/src/script/templates/PushDrop.js.map +1 -1
  8. package/dist/cjs/src/transaction/Beef.js +3 -7
  9. package/dist/cjs/src/transaction/Beef.js.map +1 -1
  10. package/dist/cjs/src/transaction/Transaction.js +3 -3
  11. package/dist/cjs/src/transaction/Transaction.js.map +1 -1
  12. package/dist/cjs/src/wallet/WERR_INSUFFICIENT_FUNDS.js +26 -0
  13. package/dist/cjs/src/wallet/WERR_INSUFFICIENT_FUNDS.js.map +1 -0
  14. package/dist/cjs/src/wallet/WERR_INVALID_PARAMETER.js +20 -0
  15. package/dist/cjs/src/wallet/WERR_INVALID_PARAMETER.js.map +1 -0
  16. package/dist/cjs/src/wallet/WalletClient.js +23 -0
  17. package/dist/cjs/src/wallet/WalletClient.js.map +1 -1
  18. package/dist/cjs/src/wallet/WalletError.js +55 -0
  19. package/dist/cjs/src/wallet/WalletError.js.map +1 -1
  20. package/dist/cjs/src/wallet/index.js +18 -1
  21. package/dist/cjs/src/wallet/index.js.map +1 -1
  22. package/dist/cjs/src/wallet/substrates/HTTPWalletJSON.js +28 -11
  23. package/dist/cjs/src/wallet/substrates/HTTPWalletJSON.js.map +1 -1
  24. package/dist/cjs/src/wallet/validationHelpers.js +920 -0
  25. package/dist/cjs/src/wallet/validationHelpers.js.map +1 -0
  26. package/dist/cjs/tsconfig.cjs.tsbuildinfo +1 -1
  27. package/dist/esm/src/primitives/utils.js +17 -0
  28. package/dist/esm/src/primitives/utils.js.map +1 -1
  29. package/dist/esm/src/script/templates/P2PKH.js +3 -8
  30. package/dist/esm/src/script/templates/P2PKH.js.map +1 -1
  31. package/dist/esm/src/script/templates/PushDrop.js +3 -8
  32. package/dist/esm/src/script/templates/PushDrop.js.map +1 -1
  33. package/dist/esm/src/transaction/Beef.js +4 -8
  34. package/dist/esm/src/transaction/Beef.js.map +1 -1
  35. package/dist/esm/src/transaction/Transaction.js +3 -3
  36. package/dist/esm/src/transaction/Transaction.js.map +1 -1
  37. package/dist/esm/src/wallet/WERR_INSUFFICIENT_FUNDS.js +25 -0
  38. package/dist/esm/src/wallet/WERR_INSUFFICIENT_FUNDS.js.map +1 -0
  39. package/dist/esm/src/wallet/WERR_INVALID_PARAMETER.js +18 -0
  40. package/dist/esm/src/wallet/WERR_INVALID_PARAMETER.js.map +1 -0
  41. package/dist/esm/src/wallet/WalletClient.js +23 -0
  42. package/dist/esm/src/wallet/WalletClient.js.map +1 -1
  43. package/dist/esm/src/wallet/WalletError.js +55 -0
  44. package/dist/esm/src/wallet/WalletError.js.map +1 -1
  45. package/dist/esm/src/wallet/index.js +3 -0
  46. package/dist/esm/src/wallet/index.js.map +1 -1
  47. package/dist/esm/src/wallet/substrates/HTTPWalletJSON.js +25 -11
  48. package/dist/esm/src/wallet/substrates/HTTPWalletJSON.js.map +1 -1
  49. package/dist/esm/src/wallet/validationHelpers.js +859 -0
  50. package/dist/esm/src/wallet/validationHelpers.js.map +1 -0
  51. package/dist/esm/tsconfig.esm.tsbuildinfo +1 -1
  52. package/dist/types/src/primitives/utils.d.ts +13 -0
  53. package/dist/types/src/primitives/utils.d.ts.map +1 -1
  54. package/dist/types/src/script/templates/P2PKH.d.ts.map +1 -1
  55. package/dist/types/src/script/templates/PushDrop.d.ts.map +1 -1
  56. package/dist/types/src/transaction/Beef.d.ts +1 -0
  57. package/dist/types/src/transaction/Beef.d.ts.map +1 -1
  58. package/dist/types/src/wallet/WERR_INSUFFICIENT_FUNDS.d.ts +19 -0
  59. package/dist/types/src/wallet/WERR_INSUFFICIENT_FUNDS.d.ts.map +1 -0
  60. package/dist/types/src/wallet/WERR_INVALID_PARAMETER.d.ts +13 -0
  61. package/dist/types/src/wallet/WERR_INVALID_PARAMETER.d.ts.map +1 -0
  62. package/dist/types/src/wallet/WalletClient.d.ts.map +1 -1
  63. package/dist/types/src/wallet/WalletError.d.ts +14 -1
  64. package/dist/types/src/wallet/WalletError.d.ts.map +1 -1
  65. package/dist/types/src/wallet/index.d.ts +3 -0
  66. package/dist/types/src/wallet/index.d.ts.map +1 -1
  67. package/dist/types/src/wallet/substrates/HTTPWalletJSON.d.ts.map +1 -1
  68. package/dist/types/src/wallet/validationHelpers.d.ts +512 -0
  69. package/dist/types/src/wallet/validationHelpers.d.ts.map +1 -0
  70. package/dist/types/tsconfig.types.tsbuildinfo +1 -1
  71. package/dist/umd/bundle.js +4 -4
  72. package/dist/umd/bundle.js.map +1 -1
  73. package/docs/reference/wallet.md +1808 -400
  74. package/package.json +1 -1
  75. package/src/primitives/__tests/utils.test.ts +27 -1
  76. package/src/primitives/utils.ts +17 -0
  77. package/src/script/__tests/Spend.test.ts +74 -1
  78. package/src/script/__tests/SpendComplex.test.ts +5 -9
  79. package/src/script/templates/P2PKH.ts +3 -8
  80. package/src/script/templates/PushDrop.ts +3 -7
  81. package/src/transaction/Beef.ts +5 -8
  82. package/src/transaction/Transaction.ts +3 -3
  83. package/src/wallet/WERR_INSUFFICIENT_FUNDS.ts +25 -0
  84. package/src/wallet/WERR_INVALID_PARAMETER.ts +20 -0
  85. package/src/wallet/WalletClient.ts +30 -0
  86. package/src/wallet/WalletError.ts +52 -0
  87. package/src/wallet/__tests/WalletClient.test.ts +31 -0
  88. package/src/wallet/index.ts +3 -0
  89. package/src/wallet/substrates/HTTPWalletJSON.ts +19 -9
  90. package/src/wallet/validationHelpers.ts +1211 -0
@@ -6,31 +6,39 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
6
6
 
7
7
  | | | |
8
8
  | --- | --- | --- |
9
- | [AbortActionArgs](#interface-abortactionargs) | [IdentityCertificate](#interface-identitycertificate) | [SignActionArgs](#interface-signactionargs) |
10
- | [AbortActionResult](#interface-abortactionresult) | [IdentityCertifier](#interface-identitycertifier) | [SignActionOptions](#interface-signactionoptions) |
11
- | [AcquireCertificateArgs](#interface-acquirecertificateargs) | [InternalizeActionArgs](#interface-internalizeactionargs) | [SignActionResult](#interface-signactionresult) |
12
- | [AuthenticatedResult](#interface-authenticatedresult) | [InternalizeActionResult](#interface-internalizeactionresult) | [SignActionSpend](#interface-signactionspend) |
13
- | [BasketInsertion](#interface-basketinsertion) | [InternalizeOutput](#interface-internalizeoutput) | [SignableTransaction](#interface-signabletransaction) |
14
- | [CertificateResult](#interface-certificateresult) | [KeyDeriverApi](#interface-keyderiverapi) | [VerifyHmacArgs](#interface-verifyhmacargs) |
15
- | [CreateActionArgs](#interface-createactionargs) | [KeyLinkageResult](#interface-keylinkageresult) | [VerifyHmacResult](#interface-verifyhmacresult) |
16
- | [CreateActionInput](#interface-createactioninput) | [ListActionsArgs](#interface-listactionsargs) | [VerifySignatureArgs](#interface-verifysignatureargs) |
17
- | [CreateActionOptions](#interface-createactionoptions) | [ListActionsResult](#interface-listactionsresult) | [VerifySignatureResult](#interface-verifysignatureresult) |
18
- | [CreateActionOutput](#interface-createactionoutput) | [ListCertificatesArgs](#interface-listcertificatesargs) | [WalletAction](#interface-walletaction) |
19
- | [CreateActionResult](#interface-createactionresult) | [ListCertificatesResult](#interface-listcertificatesresult) | [WalletActionInput](#interface-walletactioninput) |
20
- | [CreateHmacArgs](#interface-createhmacargs) | [ListOutputsArgs](#interface-listoutputsargs) | [WalletActionOutput](#interface-walletactionoutput) |
21
- | [CreateHmacResult](#interface-createhmacresult) | [ListOutputsResult](#interface-listoutputsresult) | [WalletCertificate](#interface-walletcertificate) |
22
- | [CreateSignatureArgs](#interface-createsignatureargs) | [ProveCertificateArgs](#interface-provecertificateargs) | [WalletDecryptArgs](#interface-walletdecryptargs) |
23
- | [CreateSignatureResult](#interface-createsignatureresult) | [ProveCertificateResult](#interface-provecertificateresult) | [WalletDecryptResult](#interface-walletdecryptresult) |
24
- | [DiscoverByAttributesArgs](#interface-discoverbyattributesargs) | [RelinquishCertificateArgs](#interface-relinquishcertificateargs) | [WalletEncryptArgs](#interface-walletencryptargs) |
25
- | [DiscoverByIdentityKeyArgs](#interface-discoverbyidentitykeyargs) | [RelinquishCertificateResult](#interface-relinquishcertificateresult) | [WalletEncryptResult](#interface-walletencryptresult) |
26
- | [DiscoverCertificatesResult](#interface-discovercertificatesresult) | [RelinquishOutputArgs](#interface-relinquishoutputargs) | [WalletEncryptionArgs](#interface-walletencryptionargs) |
27
- | [GetHeaderArgs](#interface-getheaderargs) | [RelinquishOutputResult](#interface-relinquishoutputresult) | [WalletErrorObject](#interface-walleterrorobject) |
28
- | [GetHeaderResult](#interface-getheaderresult) | [RevealCounterpartyKeyLinkageArgs](#interface-revealcounterpartykeylinkageargs) | [WalletInterface](#interface-walletinterface) |
29
- | [GetHeightResult](#interface-getheightresult) | [RevealCounterpartyKeyLinkageResult](#interface-revealcounterpartykeylinkageresult) | [WalletOutput](#interface-walletoutput) |
30
- | [GetNetworkResult](#interface-getnetworkresult) | [RevealSpecificKeyLinkageArgs](#interface-revealspecifickeylinkageargs) | [WalletPayment](#interface-walletpayment) |
31
- | [GetPublicKeyArgs](#interface-getpublickeyargs) | [RevealSpecificKeyLinkageResult](#interface-revealspecifickeylinkageresult) | [WalletWire](#interface-walletwire) |
32
- | [GetPublicKeyResult](#interface-getpublickeyresult) | [ReviewActionResult](#interface-reviewactionresult) | |
33
- | [GetVersionResult](#interface-getversionresult) | [SendWithResult](#interface-sendwithresult) | |
9
+ | [AbortActionArgs](#interface-abortactionargs) | [ListActionsResult](#interface-listactionsresult) | [ValidDiscoverByIdentityKeyArgs](#interface-validdiscoverbyidentitykeyargs) |
10
+ | [AbortActionResult](#interface-abortactionresult) | [ListCertificatesArgs](#interface-listcertificatesargs) | [ValidInternalizeActionArgs](#interface-validinternalizeactionargs) |
11
+ | [AcquireCertificateArgs](#interface-acquirecertificateargs) | [ListCertificatesResult](#interface-listcertificatesresult) | [ValidInternalizeOutput](#interface-validinternalizeoutput) |
12
+ | [AuthenticatedResult](#interface-authenticatedresult) | [ListOutputsArgs](#interface-listoutputsargs) | [ValidListActionsArgs](#interface-validlistactionsargs) |
13
+ | [BasketInsertion](#interface-basketinsertion) | [ListOutputsResult](#interface-listoutputsresult) | [ValidListCertificatesArgs](#interface-validlistcertificatesargs) |
14
+ | [CertificateResult](#interface-certificateresult) | [OutPoint](#interface-outpoint) | [ValidListOutputsArgs](#interface-validlistoutputsargs) |
15
+ | [CreateActionArgs](#interface-createactionargs) | [ProveCertificateArgs](#interface-provecertificateargs) | [ValidProcessActionArgs](#interface-validprocessactionargs) |
16
+ | [CreateActionInput](#interface-createactioninput) | [ProveCertificateResult](#interface-provecertificateresult) | [ValidProcessActionOptions](#interface-validprocessactionoptions) |
17
+ | [CreateActionOptions](#interface-createactionoptions) | [RelinquishCertificateArgs](#interface-relinquishcertificateargs) | [ValidProveCertificateArgs](#interface-validprovecertificateargs) |
18
+ | [CreateActionOutput](#interface-createactionoutput) | [RelinquishCertificateResult](#interface-relinquishcertificateresult) | [ValidRelinquishCertificateArgs](#interface-validrelinquishcertificateargs) |
19
+ | [CreateActionResult](#interface-createactionresult) | [RelinquishOutputArgs](#interface-relinquishoutputargs) | [ValidRelinquishOutputArgs](#interface-validrelinquishoutputargs) |
20
+ | [CreateHmacArgs](#interface-createhmacargs) | [RelinquishOutputResult](#interface-relinquishoutputresult) | [ValidSignActionArgs](#interface-validsignactionargs) |
21
+ | [CreateHmacResult](#interface-createhmacresult) | [RevealCounterpartyKeyLinkageArgs](#interface-revealcounterpartykeylinkageargs) | [ValidSignActionOptions](#interface-validsignactionoptions) |
22
+ | [CreateSignatureArgs](#interface-createsignatureargs) | [RevealCounterpartyKeyLinkageResult](#interface-revealcounterpartykeylinkageresult) | [ValidWalletPayment](#interface-validwalletpayment) |
23
+ | [CreateSignatureResult](#interface-createsignatureresult) | [RevealSpecificKeyLinkageArgs](#interface-revealspecifickeylinkageargs) | [ValidWalletSignerArgs](#interface-validwalletsignerargs) |
24
+ | [DiscoverByAttributesArgs](#interface-discoverbyattributesargs) | [RevealSpecificKeyLinkageResult](#interface-revealspecifickeylinkageresult) | [VerifyHmacArgs](#interface-verifyhmacargs) |
25
+ | [DiscoverByIdentityKeyArgs](#interface-discoverbyidentitykeyargs) | [ReviewActionResult](#interface-reviewactionresult) | [VerifyHmacResult](#interface-verifyhmacresult) |
26
+ | [DiscoverCertificatesResult](#interface-discovercertificatesresult) | [SendWithResult](#interface-sendwithresult) | [VerifySignatureArgs](#interface-verifysignatureargs) |
27
+ | [GetHeaderArgs](#interface-getheaderargs) | [SignActionArgs](#interface-signactionargs) | [VerifySignatureResult](#interface-verifysignatureresult) |
28
+ | [GetHeaderResult](#interface-getheaderresult) | [SignActionOptions](#interface-signactionoptions) | [WalletAction](#interface-walletaction) |
29
+ | [GetHeightResult](#interface-getheightresult) | [SignActionResult](#interface-signactionresult) | [WalletActionInput](#interface-walletactioninput) |
30
+ | [GetNetworkResult](#interface-getnetworkresult) | [SignActionSpend](#interface-signactionspend) | [WalletActionOutput](#interface-walletactionoutput) |
31
+ | [GetPublicKeyArgs](#interface-getpublickeyargs) | [SignableTransaction](#interface-signabletransaction) | [WalletCertificate](#interface-walletcertificate) |
32
+ | [GetPublicKeyResult](#interface-getpublickeyresult) | [ValidAbortActionArgs](#interface-validabortactionargs) | [WalletDecryptArgs](#interface-walletdecryptargs) |
33
+ | [GetVersionResult](#interface-getversionresult) | [ValidAcquireCertificateArgs](#interface-validacquirecertificateargs) | [WalletDecryptResult](#interface-walletdecryptresult) |
34
+ | [IdentityCertificate](#interface-identitycertificate) | [ValidAcquireDirectCertificateArgs](#interface-validacquiredirectcertificateargs) | [WalletEncryptArgs](#interface-walletencryptargs) |
35
+ | [IdentityCertifier](#interface-identitycertifier) | [ValidAcquireIssuanceCertificateArgs](#interface-validacquireissuancecertificateargs) | [WalletEncryptResult](#interface-walletencryptresult) |
36
+ | [InternalizeActionArgs](#interface-internalizeactionargs) | [ValidBasketInsertion](#interface-validbasketinsertion) | [WalletEncryptionArgs](#interface-walletencryptionargs) |
37
+ | [InternalizeActionResult](#interface-internalizeactionresult) | [ValidCreateActionArgs](#interface-validcreateactionargs) | [WalletErrorObject](#interface-walleterrorobject) |
38
+ | [InternalizeOutput](#interface-internalizeoutput) | [ValidCreateActionInput](#interface-validcreateactioninput) | [WalletInterface](#interface-walletinterface) |
39
+ | [KeyDeriverApi](#interface-keyderiverapi) | [ValidCreateActionOptions](#interface-validcreateactionoptions) | [WalletOutput](#interface-walletoutput) |
40
+ | [KeyLinkageResult](#interface-keylinkageresult) | [ValidCreateActionOutput](#interface-validcreateactionoutput) | [WalletPayment](#interface-walletpayment) |
41
+ | [ListActionsArgs](#interface-listactionsargs) | [ValidDiscoverByAttributesArgs](#interface-validdiscoverbyattributesargs) | [WalletWire](#interface-walletwire) |
34
42
 
35
43
  Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
36
44
 
@@ -692,6 +700,36 @@ See also: [BEEF](./wallet.md#type-beef), [PositiveIntegerOrZero](./wallet.md#typ
692
700
 
693
701
  Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
694
702
 
703
+ ---
704
+ ### Interface: OutPoint
705
+
706
+ Identifies a unique transaction output by its `txid` and index `vout`
707
+
708
+ ```ts
709
+ export interface OutPoint {
710
+ txid: string;
711
+ vout: number;
712
+ }
713
+ ```
714
+
715
+ #### Property txid
716
+
717
+ Transaction double sha256 hash as big endian hex string
718
+
719
+ ```ts
720
+ txid: string
721
+ ```
722
+
723
+ #### Property vout
724
+
725
+ zero based output index within the transaction
726
+
727
+ ```ts
728
+ vout: number
729
+ ```
730
+
731
+ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
732
+
695
733
  ---
696
734
  ### Interface: ProveCertificateArgs
697
735
 
@@ -958,688 +996,1168 @@ See also: [AtomicBEEF](./wallet.md#type-atomicbeef), [Base64String](./wallet.md#
958
996
  Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
959
997
 
960
998
  ---
961
- ### Interface: VerifyHmacArgs
999
+ ### Interface: ValidAbortActionArgs
962
1000
 
963
1001
  ```ts
964
- export interface VerifyHmacArgs extends WalletEncryptionArgs {
965
- data: Byte[];
966
- hmac: Byte[];
1002
+ export interface ValidAbortActionArgs extends ValidWalletSignerArgs {
1003
+ reference: Base64String;
967
1004
  }
968
1005
  ```
969
1006
 
970
- See also: [Byte](./wallet.md#type-byte), [WalletEncryptionArgs](./wallet.md#interface-walletencryptionargs)
1007
+ See also: [Base64String](./wallet.md#type-base64string), [ValidWalletSignerArgs](./wallet.md#interface-validwalletsignerargs)
971
1008
 
972
1009
  Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
973
1010
 
974
1011
  ---
975
- ### Interface: VerifyHmacResult
1012
+ ### Interface: ValidAcquireCertificateArgs
976
1013
 
977
1014
  ```ts
978
- export interface VerifyHmacResult {
979
- valid: true;
1015
+ export interface ValidAcquireCertificateArgs extends ValidWalletSignerArgs {
1016
+ acquisitionProtocol: AcquisitionProtocol;
1017
+ type: Base64String;
1018
+ serialNumber?: Base64String;
1019
+ certifier: PubKeyHex;
1020
+ revocationOutpoint?: OutpointString;
1021
+ fields: Record<CertificateFieldNameUnder50Bytes, string>;
1022
+ signature?: HexString;
1023
+ certifierUrl?: string;
1024
+ keyringRevealer?: KeyringRevealer;
1025
+ keyringForSubject?: Record<CertificateFieldNameUnder50Bytes, Base64String>;
1026
+ privileged: boolean;
1027
+ privilegedReason?: DescriptionString5to50Bytes;
980
1028
  }
981
1029
  ```
982
1030
 
1031
+ See also: [AcquisitionProtocol](./wallet.md#type-acquisitionprotocol), [Base64String](./wallet.md#type-base64string), [CertificateFieldNameUnder50Bytes](./wallet.md#type-certificatefieldnameunder50bytes), [DescriptionString5to50Bytes](./wallet.md#type-descriptionstring5to50bytes), [HexString](./wallet.md#type-hexstring), [KeyringRevealer](./wallet.md#type-keyringrevealer), [OutpointString](./wallet.md#type-outpointstring), [PubKeyHex](./wallet.md#type-pubkeyhex), [ValidWalletSignerArgs](./wallet.md#interface-validwalletsignerargs)
1032
+
983
1033
  Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
984
1034
 
985
1035
  ---
986
- ### Interface: VerifySignatureArgs
1036
+ ### Interface: ValidAcquireDirectCertificateArgs
987
1037
 
988
1038
  ```ts
989
- export interface VerifySignatureArgs extends WalletEncryptionArgs {
990
- data?: Byte[];
991
- hashToDirectlyVerify?: Byte[];
992
- signature: Byte[];
993
- forSelf?: BooleanDefaultFalse;
1039
+ export interface ValidAcquireDirectCertificateArgs extends ValidWalletSignerArgs {
1040
+ type: Base64String;
1041
+ serialNumber: Base64String;
1042
+ certifier: PubKeyHex;
1043
+ revocationOutpoint: OutpointString;
1044
+ fields: Record<CertificateFieldNameUnder50Bytes, string>;
1045
+ signature: HexString;
1046
+ subject: PubKeyHex;
1047
+ keyringRevealer: KeyringRevealer;
1048
+ keyringForSubject: Record<CertificateFieldNameUnder50Bytes, Base64String>;
1049
+ privileged: boolean;
1050
+ privilegedReason?: DescriptionString5to50Bytes;
994
1051
  }
995
1052
  ```
996
1053
 
997
- See also: [BooleanDefaultFalse](./wallet.md#type-booleandefaultfalse), [Byte](./wallet.md#type-byte), [WalletEncryptionArgs](./wallet.md#interface-walletencryptionargs)
1054
+ See also: [Base64String](./wallet.md#type-base64string), [CertificateFieldNameUnder50Bytes](./wallet.md#type-certificatefieldnameunder50bytes), [DescriptionString5to50Bytes](./wallet.md#type-descriptionstring5to50bytes), [HexString](./wallet.md#type-hexstring), [KeyringRevealer](./wallet.md#type-keyringrevealer), [OutpointString](./wallet.md#type-outpointstring), [PubKeyHex](./wallet.md#type-pubkeyhex), [ValidWalletSignerArgs](./wallet.md#interface-validwalletsignerargs)
998
1055
 
999
- Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
1056
+ #### Property subject
1000
1057
 
1001
- ---
1002
- ### Interface: VerifySignatureResult
1058
+ validated to an empty string, must be provided by wallet and must
1059
+ match expectations of keyringForSubject
1003
1060
 
1004
1061
  ```ts
1005
- export interface VerifySignatureResult {
1006
- valid: true;
1007
- }
1062
+ subject: PubKeyHex
1008
1063
  ```
1064
+ See also: [PubKeyHex](./wallet.md#type-pubkeyhex)
1009
1065
 
1010
1066
  Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
1011
1067
 
1012
1068
  ---
1013
- ### Interface: WalletAction
1069
+ ### Interface: ValidAcquireIssuanceCertificateArgs
1014
1070
 
1015
1071
  ```ts
1016
- export interface WalletAction {
1017
- txid: TXIDHexString;
1018
- satoshis: SatoshiValue;
1019
- status: ActionStatus;
1020
- isOutgoing: boolean;
1021
- description: DescriptionString5to50Bytes;
1022
- labels?: LabelStringUnder300Bytes[];
1023
- version: PositiveIntegerOrZero;
1024
- lockTime: PositiveIntegerOrZero;
1025
- inputs?: WalletActionInput[];
1026
- outputs?: WalletActionOutput[];
1072
+ export interface ValidAcquireIssuanceCertificateArgs extends ValidWalletSignerArgs {
1073
+ type: Base64String;
1074
+ certifier: PubKeyHex;
1075
+ certifierUrl: string;
1076
+ fields: Record<CertificateFieldNameUnder50Bytes, string>;
1077
+ subject: PubKeyHex;
1078
+ privileged: boolean;
1079
+ privilegedReason?: DescriptionString5to50Bytes;
1027
1080
  }
1028
1081
  ```
1029
1082
 
1030
- See also: [ActionStatus](./wallet.md#type-actionstatus), [DescriptionString5to50Bytes](./wallet.md#type-descriptionstring5to50bytes), [LabelStringUnder300Bytes](./wallet.md#type-labelstringunder300bytes), [PositiveIntegerOrZero](./wallet.md#type-positiveintegerorzero), [SatoshiValue](./wallet.md#type-satoshivalue), [TXIDHexString](./wallet.md#type-txidhexstring), [WalletActionInput](./wallet.md#interface-walletactioninput), [WalletActionOutput](./wallet.md#interface-walletactionoutput)
1083
+ See also: [Base64String](./wallet.md#type-base64string), [CertificateFieldNameUnder50Bytes](./wallet.md#type-certificatefieldnameunder50bytes), [DescriptionString5to50Bytes](./wallet.md#type-descriptionstring5to50bytes), [PubKeyHex](./wallet.md#type-pubkeyhex), [ValidWalletSignerArgs](./wallet.md#interface-validwalletsignerargs)
1031
1084
 
1032
- Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
1085
+ #### Property subject
1033
1086
 
1034
- ---
1035
- ### Interface: WalletActionInput
1087
+ validated to an empty string, must be provided by wallet and must
1088
+ match expectations of keyringForSubject
1036
1089
 
1037
1090
  ```ts
1038
- export interface WalletActionInput {
1039
- sourceOutpoint: OutpointString;
1040
- sourceSatoshis: SatoshiValue;
1041
- sourceLockingScript?: HexString;
1042
- unlockingScript?: HexString;
1043
- inputDescription: DescriptionString5to50Bytes;
1044
- sequenceNumber: PositiveIntegerOrZero;
1045
- }
1091
+ subject: PubKeyHex
1046
1092
  ```
1047
-
1048
- See also: [DescriptionString5to50Bytes](./wallet.md#type-descriptionstring5to50bytes), [HexString](./wallet.md#type-hexstring), [OutpointString](./wallet.md#type-outpointstring), [PositiveIntegerOrZero](./wallet.md#type-positiveintegerorzero), [SatoshiValue](./wallet.md#type-satoshivalue)
1093
+ See also: [PubKeyHex](./wallet.md#type-pubkeyhex)
1049
1094
 
1050
1095
  Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
1051
1096
 
1052
1097
  ---
1053
- ### Interface: WalletActionOutput
1098
+ ### Interface: ValidBasketInsertion
1054
1099
 
1055
1100
  ```ts
1056
- export interface WalletActionOutput {
1057
- satoshis: SatoshiValue;
1058
- lockingScript?: HexString;
1059
- spendable: boolean;
1060
- customInstructions?: string;
1061
- tags: OutputTagStringUnder300Bytes[];
1062
- outputIndex: PositiveIntegerOrZero;
1063
- outputDescription: DescriptionString5to50Bytes;
1101
+ export interface ValidBasketInsertion {
1064
1102
  basket: BasketStringUnder300Bytes;
1103
+ customInstructions?: string;
1104
+ tags: BasketStringUnder300Bytes[];
1065
1105
  }
1066
1106
  ```
1067
1107
 
1068
- See also: [BasketStringUnder300Bytes](./wallet.md#type-basketstringunder300bytes), [DescriptionString5to50Bytes](./wallet.md#type-descriptionstring5to50bytes), [HexString](./wallet.md#type-hexstring), [OutputTagStringUnder300Bytes](./wallet.md#type-outputtagstringunder300bytes), [PositiveIntegerOrZero](./wallet.md#type-positiveintegerorzero), [SatoshiValue](./wallet.md#type-satoshivalue)
1108
+ See also: [BasketStringUnder300Bytes](./wallet.md#type-basketstringunder300bytes)
1069
1109
 
1070
1110
  Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
1071
1111
 
1072
1112
  ---
1073
- ### Interface: WalletCertificate
1113
+ ### Interface: ValidCreateActionArgs
1074
1114
 
1075
1115
  ```ts
1076
- export interface WalletCertificate {
1077
- type: Base64String;
1078
- subject: PubKeyHex;
1079
- serialNumber: Base64String;
1080
- certifier: PubKeyHex;
1081
- revocationOutpoint: OutpointString;
1082
- signature: HexString;
1083
- fields: Record<CertificateFieldNameUnder50Bytes, string>;
1116
+ export interface ValidCreateActionArgs extends ValidProcessActionArgs {
1117
+ description: DescriptionString5to2000Bytes;
1118
+ inputBEEF?: BEEF;
1119
+ inputs: ValidCreateActionInput[];
1120
+ outputs: ValidCreateActionOutput[];
1121
+ lockTime: number;
1122
+ version: number;
1123
+ labels: string[];
1124
+ options: ValidCreateActionOptions;
1125
+ isSignAction: boolean;
1126
+ randomVals?: number[];
1127
+ includeAllSourceTransactions: boolean;
1084
1128
  }
1085
1129
  ```
1086
1130
 
1087
- See also: [Base64String](./wallet.md#type-base64string), [CertificateFieldNameUnder50Bytes](./wallet.md#type-certificatefieldnameunder50bytes), [HexString](./wallet.md#type-hexstring), [OutpointString](./wallet.md#type-outpointstring), [PubKeyHex](./wallet.md#type-pubkeyhex)
1131
+ See also: [BEEF](./wallet.md#type-beef), [DescriptionString5to2000Bytes](./wallet.md#type-descriptionstring5to2000bytes), [ValidCreateActionInput](./wallet.md#interface-validcreateactioninput), [ValidCreateActionOptions](./wallet.md#interface-validcreateactionoptions), [ValidCreateActionOutput](./wallet.md#interface-validcreateactionoutput), [ValidProcessActionArgs](./wallet.md#interface-validprocessactionargs)
1132
+
1133
+ #### Property includeAllSourceTransactions
1134
+
1135
+ If true, signableTransactions will include sourceTransaction for each input,
1136
+ including those that do not require signature and those that were also contained
1137
+ in the inputBEEF.
1138
+
1139
+ ```ts
1140
+ includeAllSourceTransactions: boolean
1141
+ ```
1088
1142
 
1089
1143
  Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
1090
1144
 
1091
1145
  ---
1092
- ### Interface: WalletDecryptArgs
1146
+ ### Interface: ValidCreateActionInput
1093
1147
 
1094
1148
  ```ts
1095
- export interface WalletDecryptArgs extends WalletEncryptionArgs {
1096
- ciphertext: Byte[];
1149
+ export interface ValidCreateActionInput {
1150
+ outpoint: OutPoint;
1151
+ inputDescription: DescriptionString5to2000Bytes;
1152
+ sequenceNumber: PositiveIntegerOrZero;
1153
+ unlockingScript?: HexString;
1154
+ unlockingScriptLength: PositiveInteger;
1097
1155
  }
1098
1156
  ```
1099
1157
 
1100
- See also: [Byte](./wallet.md#type-byte), [WalletEncryptionArgs](./wallet.md#interface-walletencryptionargs)
1158
+ See also: [DescriptionString5to2000Bytes](./wallet.md#type-descriptionstring5to2000bytes), [HexString](./wallet.md#type-hexstring), [OutPoint](./wallet.md#interface-outpoint), [PositiveInteger](./wallet.md#type-positiveinteger), [PositiveIntegerOrZero](./wallet.md#type-positiveintegerorzero)
1101
1159
 
1102
1160
  Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
1103
1161
 
1104
1162
  ---
1105
- ### Interface: WalletDecryptResult
1163
+ ### Interface: ValidCreateActionOptions
1106
1164
 
1107
1165
  ```ts
1108
- export interface WalletDecryptResult {
1109
- plaintext: Byte[];
1166
+ export interface ValidCreateActionOptions extends ValidProcessActionOptions {
1167
+ signAndProcess: boolean;
1168
+ trustSelf?: TrustSelf;
1169
+ knownTxids: TXIDHexString[];
1170
+ noSendChange: OutPoint[];
1171
+ randomizeOutputs: boolean;
1110
1172
  }
1111
1173
  ```
1112
1174
 
1113
- See also: [Byte](./wallet.md#type-byte)
1175
+ See also: [OutPoint](./wallet.md#interface-outpoint), [TXIDHexString](./wallet.md#type-txidhexstring), [TrustSelf](./wallet.md#type-trustself), [ValidProcessActionOptions](./wallet.md#interface-validprocessactionoptions)
1114
1176
 
1115
1177
  Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
1116
1178
 
1117
1179
  ---
1118
- ### Interface: WalletEncryptArgs
1180
+ ### Interface: ValidCreateActionOutput
1119
1181
 
1120
1182
  ```ts
1121
- export interface WalletEncryptArgs extends WalletEncryptionArgs {
1122
- plaintext: Byte[];
1183
+ export interface ValidCreateActionOutput {
1184
+ lockingScript: HexString;
1185
+ satoshis: SatoshiValue;
1186
+ outputDescription: DescriptionString5to2000Bytes;
1187
+ basket?: BasketStringUnder300Bytes;
1188
+ customInstructions?: string;
1189
+ tags: BasketStringUnder300Bytes[];
1123
1190
  }
1124
1191
  ```
1125
1192
 
1126
- See also: [Byte](./wallet.md#type-byte), [WalletEncryptionArgs](./wallet.md#interface-walletencryptionargs)
1193
+ See also: [BasketStringUnder300Bytes](./wallet.md#type-basketstringunder300bytes), [DescriptionString5to2000Bytes](./wallet.md#type-descriptionstring5to2000bytes), [HexString](./wallet.md#type-hexstring), [SatoshiValue](./wallet.md#type-satoshivalue)
1127
1194
 
1128
1195
  Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
1129
1196
 
1130
1197
  ---
1131
- ### Interface: WalletEncryptResult
1198
+ ### Interface: ValidDiscoverByAttributesArgs
1132
1199
 
1133
1200
  ```ts
1134
- export interface WalletEncryptResult {
1135
- ciphertext: Byte[];
1201
+ export interface ValidDiscoverByAttributesArgs extends ValidWalletSignerArgs {
1202
+ attributes: Record<CertificateFieldNameUnder50Bytes, string>;
1203
+ limit: PositiveIntegerDefault10Max10000;
1204
+ offset: PositiveIntegerOrZero;
1205
+ seekPermission: boolean;
1136
1206
  }
1137
1207
  ```
1138
1208
 
1139
- See also: [Byte](./wallet.md#type-byte)
1209
+ See also: [CertificateFieldNameUnder50Bytes](./wallet.md#type-certificatefieldnameunder50bytes), [PositiveIntegerDefault10Max10000](./wallet.md#type-positiveintegerdefault10max10000), [PositiveIntegerOrZero](./wallet.md#type-positiveintegerorzero), [ValidWalletSignerArgs](./wallet.md#interface-validwalletsignerargs)
1140
1210
 
1141
1211
  Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
1142
1212
 
1143
1213
  ---
1144
- ### Interface: WalletEncryptionArgs
1214
+ ### Interface: ValidDiscoverByIdentityKeyArgs
1145
1215
 
1146
1216
  ```ts
1147
- export interface WalletEncryptionArgs {
1148
- protocolID: WalletProtocol;
1149
- keyID: KeyIDStringUnder800Bytes;
1150
- counterparty?: WalletCounterparty;
1151
- privileged?: BooleanDefaultFalse;
1152
- privilegedReason?: DescriptionString5to50Bytes;
1153
- seekPermission?: BooleanDefaultTrue;
1217
+ export interface ValidDiscoverByIdentityKeyArgs extends ValidWalletSignerArgs {
1218
+ identityKey: PubKeyHex;
1219
+ limit: PositiveIntegerDefault10Max10000;
1220
+ offset: PositiveIntegerOrZero;
1221
+ seekPermission: boolean;
1154
1222
  }
1155
1223
  ```
1156
1224
 
1157
- See also: [BooleanDefaultFalse](./wallet.md#type-booleandefaultfalse), [BooleanDefaultTrue](./wallet.md#type-booleandefaulttrue), [DescriptionString5to50Bytes](./wallet.md#type-descriptionstring5to50bytes), [KeyIDStringUnder800Bytes](./wallet.md#type-keyidstringunder800bytes), [WalletCounterparty](./wallet.md#type-walletcounterparty), [WalletProtocol](./wallet.md#type-walletprotocol)
1225
+ See also: [PositiveIntegerDefault10Max10000](./wallet.md#type-positiveintegerdefault10max10000), [PositiveIntegerOrZero](./wallet.md#type-positiveintegerorzero), [PubKeyHex](./wallet.md#type-pubkeyhex), [ValidWalletSignerArgs](./wallet.md#interface-validwalletsignerargs)
1158
1226
 
1159
1227
  Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
1160
1228
 
1161
1229
  ---
1162
- ### Interface: WalletErrorObject
1163
-
1164
- Every method of the `Wallet` interface has a return value of the form `Promise<object>`.
1165
- When errors occur, an exception object may be thrown which must conform to the `WalletErrorObject` interface.
1166
- Serialization layers can rely on the `isError` property being unique to error objects.
1167
- Deserialization should rethrow `WalletErrorObject` conforming objects.
1230
+ ### Interface: ValidInternalizeActionArgs
1168
1231
 
1169
1232
  ```ts
1170
- export interface WalletErrorObject extends Error {
1171
- isError: true;
1233
+ export interface ValidInternalizeActionArgs extends ValidWalletSignerArgs {
1234
+ tx: AtomicBEEF;
1235
+ outputs: InternalizeOutput[];
1236
+ description: DescriptionString5to2000Bytes;
1237
+ labels: LabelStringUnder300Bytes[];
1238
+ seekPermission: BooleanDefaultTrue;
1172
1239
  }
1173
1240
  ```
1174
1241
 
1242
+ See also: [AtomicBEEF](./wallet.md#type-atomicbeef), [BooleanDefaultTrue](./wallet.md#type-booleandefaulttrue), [DescriptionString5to2000Bytes](./wallet.md#type-descriptionstring5to2000bytes), [InternalizeOutput](./wallet.md#interface-internalizeoutput), [LabelStringUnder300Bytes](./wallet.md#type-labelstringunder300bytes), [ValidWalletSignerArgs](./wallet.md#interface-validwalletsignerargs)
1243
+
1175
1244
  Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
1176
1245
 
1177
1246
  ---
1178
- ### Interface: WalletInterface
1247
+ ### Interface: ValidInternalizeOutput
1179
1248
 
1180
- The Wallet interface defines a wallet capable of various tasks including transaction creation and signing,
1181
- encryption, decryption, identity certificate management, identity verification, and communication
1182
- with applications as per the BRC standards. This interface allows applications to interact with
1183
- the wallet for a range of functionalities aligned with the Babbage architectural principles.
1249
+ ```ts
1250
+ export interface ValidInternalizeOutput {
1251
+ outputIndex: PositiveIntegerOrZero;
1252
+ protocol: "wallet payment" | "basket insertion";
1253
+ paymentRemittance?: ValidWalletPayment;
1254
+ insertionRemittance?: ValidBasketInsertion;
1255
+ }
1256
+ ```
1184
1257
 
1185
- Error Handling
1258
+ See also: [PositiveIntegerOrZero](./wallet.md#type-positiveintegerorzero), [ValidBasketInsertion](./wallet.md#interface-validbasketinsertion), [ValidWalletPayment](./wallet.md#interface-validwalletpayment)
1186
1259
 
1187
- Every method of the `Wallet` interface has a return value of the form `Promise<object>`.
1188
- When an error occurs, an exception object may be thrown which must conform to the `WalletErrorObject` interface.
1189
- Serialization layers can rely on the `isError` property being unique to error objects to
1190
- deserialize and rethrow `WalletErrorObject` conforming objects.
1260
+ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
1261
+
1262
+ ---
1263
+ ### Interface: ValidListActionsArgs
1191
1264
 
1192
1265
  ```ts
1193
- export interface WalletInterface {
1194
- getPublicKey: (args: GetPublicKeyArgs, originator?: OriginatorDomainNameStringUnder250Bytes) => Promise<GetPublicKeyResult>;
1195
- revealCounterpartyKeyLinkage: (args: RevealCounterpartyKeyLinkageArgs, originator?: OriginatorDomainNameStringUnder250Bytes) => Promise<RevealCounterpartyKeyLinkageResult>;
1196
- revealSpecificKeyLinkage: (args: RevealSpecificKeyLinkageArgs, originator?: OriginatorDomainNameStringUnder250Bytes) => Promise<RevealSpecificKeyLinkageResult>;
1197
- encrypt: (args: WalletEncryptArgs, originator?: OriginatorDomainNameStringUnder250Bytes) => Promise<WalletEncryptResult>;
1198
- decrypt: (args: WalletDecryptArgs, originator?: OriginatorDomainNameStringUnder250Bytes) => Promise<WalletDecryptResult>;
1199
- createHmac: (args: CreateHmacArgs, originator?: OriginatorDomainNameStringUnder250Bytes) => Promise<CreateHmacResult>;
1200
- verifyHmac: (args: VerifyHmacArgs, originator?: OriginatorDomainNameStringUnder250Bytes) => Promise<VerifyHmacResult>;
1201
- createSignature: (args: CreateSignatureArgs, originator?: OriginatorDomainNameStringUnder250Bytes) => Promise<CreateSignatureResult>;
1202
- verifySignature: (args: VerifySignatureArgs, originator?: OriginatorDomainNameStringUnder250Bytes) => Promise<VerifySignatureResult>;
1203
- createAction: (args: CreateActionArgs, originator?: OriginatorDomainNameStringUnder250Bytes) => Promise<CreateActionResult>;
1204
- signAction: (args: SignActionArgs, originator?: OriginatorDomainNameStringUnder250Bytes) => Promise<SignActionResult>;
1205
- abortAction: (args: AbortActionArgs, originator?: OriginatorDomainNameStringUnder250Bytes) => Promise<AbortActionResult>;
1206
- listActions: (args: ListActionsArgs, originator?: OriginatorDomainNameStringUnder250Bytes) => Promise<ListActionsResult>;
1207
- internalizeAction: (args: InternalizeActionArgs, originator?: OriginatorDomainNameStringUnder250Bytes) => Promise<InternalizeActionResult>;
1208
- listOutputs: (args: ListOutputsArgs, originator?: OriginatorDomainNameStringUnder250Bytes) => Promise<ListOutputsResult>;
1209
- relinquishOutput: (args: RelinquishOutputArgs, originator?: OriginatorDomainNameStringUnder250Bytes) => Promise<RelinquishOutputResult>;
1210
- acquireCertificate: (args: AcquireCertificateArgs, originator?: OriginatorDomainNameStringUnder250Bytes) => Promise<WalletCertificate>;
1211
- listCertificates: (args: ListCertificatesArgs, originator?: OriginatorDomainNameStringUnder250Bytes) => Promise<ListCertificatesResult>;
1212
- proveCertificate: (args: ProveCertificateArgs, originator?: OriginatorDomainNameStringUnder250Bytes) => Promise<ProveCertificateResult>;
1213
- relinquishCertificate: (args: RelinquishCertificateArgs, originator?: OriginatorDomainNameStringUnder250Bytes) => Promise<RelinquishCertificateResult>;
1214
- discoverByIdentityKey: (args: DiscoverByIdentityKeyArgs, originator?: OriginatorDomainNameStringUnder250Bytes) => Promise<DiscoverCertificatesResult>;
1215
- discoverByAttributes: (args: DiscoverByAttributesArgs, originator?: OriginatorDomainNameStringUnder250Bytes) => Promise<DiscoverCertificatesResult>;
1216
- isAuthenticated: (args: object, originator?: OriginatorDomainNameStringUnder250Bytes) => Promise<AuthenticatedResult>;
1217
- waitForAuthentication: (args: object, originator?: OriginatorDomainNameStringUnder250Bytes) => Promise<AuthenticatedResult>;
1218
- getHeight: (args: object, originator?: OriginatorDomainNameStringUnder250Bytes) => Promise<GetHeightResult>;
1219
- getHeaderForHeight: (args: GetHeaderArgs, originator?: OriginatorDomainNameStringUnder250Bytes) => Promise<GetHeaderResult>;
1220
- getNetwork: (args: object, originator?: OriginatorDomainNameStringUnder250Bytes) => Promise<GetNetworkResult>;
1221
- getVersion: (args: object, originator?: OriginatorDomainNameStringUnder250Bytes) => Promise<GetVersionResult>;
1266
+ export interface ValidListActionsArgs extends ValidWalletSignerArgs {
1267
+ labels: LabelStringUnder300Bytes[];
1268
+ labelQueryMode: "any" | "all";
1269
+ includeLabels: BooleanDefaultFalse;
1270
+ includeInputs: BooleanDefaultFalse;
1271
+ includeInputSourceLockingScripts: BooleanDefaultFalse;
1272
+ includeInputUnlockingScripts: BooleanDefaultFalse;
1273
+ includeOutputs: BooleanDefaultFalse;
1274
+ includeOutputLockingScripts: BooleanDefaultFalse;
1275
+ limit: PositiveIntegerDefault10Max10000;
1276
+ offset: PositiveIntegerOrZero;
1277
+ seekPermission: BooleanDefaultTrue;
1222
1278
  }
1223
1279
  ```
1224
1280
 
1225
- See also: [AbortActionArgs](./wallet.md#interface-abortactionargs), [AbortActionResult](./wallet.md#interface-abortactionresult), [AcquireCertificateArgs](./wallet.md#interface-acquirecertificateargs), [AuthenticatedResult](./wallet.md#interface-authenticatedresult), [CreateActionArgs](./wallet.md#interface-createactionargs), [CreateActionResult](./wallet.md#interface-createactionresult), [CreateHmacArgs](./wallet.md#interface-createhmacargs), [CreateHmacResult](./wallet.md#interface-createhmacresult), [CreateSignatureArgs](./wallet.md#interface-createsignatureargs), [CreateSignatureResult](./wallet.md#interface-createsignatureresult), [DiscoverByAttributesArgs](./wallet.md#interface-discoverbyattributesargs), [DiscoverByIdentityKeyArgs](./wallet.md#interface-discoverbyidentitykeyargs), [DiscoverCertificatesResult](./wallet.md#interface-discovercertificatesresult), [GetHeaderArgs](./wallet.md#interface-getheaderargs), [GetHeaderResult](./wallet.md#interface-getheaderresult), [GetHeightResult](./wallet.md#interface-getheightresult), [GetNetworkResult](./wallet.md#interface-getnetworkresult), [GetPublicKeyArgs](./wallet.md#interface-getpublickeyargs), [GetPublicKeyResult](./wallet.md#interface-getpublickeyresult), [GetVersionResult](./wallet.md#interface-getversionresult), [InternalizeActionArgs](./wallet.md#interface-internalizeactionargs), [InternalizeActionResult](./wallet.md#interface-internalizeactionresult), [ListActionsArgs](./wallet.md#interface-listactionsargs), [ListActionsResult](./wallet.md#interface-listactionsresult), [ListCertificatesArgs](./wallet.md#interface-listcertificatesargs), [ListCertificatesResult](./wallet.md#interface-listcertificatesresult), [ListOutputsArgs](./wallet.md#interface-listoutputsargs), [ListOutputsResult](./wallet.md#interface-listoutputsresult), [OriginatorDomainNameStringUnder250Bytes](./wallet.md#type-originatordomainnamestringunder250bytes), [ProveCertificateArgs](./wallet.md#interface-provecertificateargs), [ProveCertificateResult](./wallet.md#interface-provecertificateresult), [RelinquishCertificateArgs](./wallet.md#interface-relinquishcertificateargs), [RelinquishCertificateResult](./wallet.md#interface-relinquishcertificateresult), [RelinquishOutputArgs](./wallet.md#interface-relinquishoutputargs), [RelinquishOutputResult](./wallet.md#interface-relinquishoutputresult), [RevealCounterpartyKeyLinkageArgs](./wallet.md#interface-revealcounterpartykeylinkageargs), [RevealCounterpartyKeyLinkageResult](./wallet.md#interface-revealcounterpartykeylinkageresult), [RevealSpecificKeyLinkageArgs](./wallet.md#interface-revealspecifickeylinkageargs), [RevealSpecificKeyLinkageResult](./wallet.md#interface-revealspecifickeylinkageresult), [SignActionArgs](./wallet.md#interface-signactionargs), [SignActionResult](./wallet.md#interface-signactionresult), [VerifyHmacArgs](./wallet.md#interface-verifyhmacargs), [VerifyHmacResult](./wallet.md#interface-verifyhmacresult), [VerifySignatureArgs](./wallet.md#interface-verifysignatureargs), [VerifySignatureResult](./wallet.md#interface-verifysignatureresult), [WalletCertificate](./wallet.md#interface-walletcertificate), [WalletDecryptArgs](./wallet.md#interface-walletdecryptargs), [WalletDecryptResult](./wallet.md#interface-walletdecryptresult), [WalletEncryptArgs](./wallet.md#interface-walletencryptargs), [WalletEncryptResult](./wallet.md#interface-walletencryptresult), [decrypt](./messages.md#variable-decrypt), [encrypt](./messages.md#variable-encrypt)
1281
+ See also: [BooleanDefaultFalse](./wallet.md#type-booleandefaultfalse), [BooleanDefaultTrue](./wallet.md#type-booleandefaulttrue), [LabelStringUnder300Bytes](./wallet.md#type-labelstringunder300bytes), [PositiveIntegerDefault10Max10000](./wallet.md#type-positiveintegerdefault10max10000), [PositiveIntegerOrZero](./wallet.md#type-positiveintegerorzero), [ValidWalletSignerArgs](./wallet.md#interface-validwalletsignerargs)
1226
1282
 
1227
- #### Property abortAction
1283
+ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
1228
1284
 
1229
- Aborts a transaction that is in progress and has not yet been finalized or sent to the network.
1285
+ ---
1286
+ ### Interface: ValidListCertificatesArgs
1230
1287
 
1231
1288
  ```ts
1232
- abortAction: (args: AbortActionArgs, originator?: OriginatorDomainNameStringUnder250Bytes) => Promise<AbortActionResult>
1289
+ export interface ValidListCertificatesArgs extends ValidWalletSignerArgs {
1290
+ partial?: {
1291
+ type?: Base64String;
1292
+ serialNumber?: Base64String;
1293
+ certifier?: PubKeyHex;
1294
+ subject?: PubKeyHex;
1295
+ revocationOutpoint?: OutpointString;
1296
+ signature?: HexString;
1297
+ };
1298
+ certifiers: PubKeyHex[];
1299
+ types: Base64String[];
1300
+ limit: PositiveIntegerDefault10Max10000;
1301
+ offset: PositiveIntegerOrZero;
1302
+ privileged: BooleanDefaultFalse;
1303
+ privilegedReason?: DescriptionString5to50Bytes;
1304
+ }
1233
1305
  ```
1234
- See also: [AbortActionArgs](./wallet.md#interface-abortactionargs), [AbortActionResult](./wallet.md#interface-abortactionresult), [OriginatorDomainNameStringUnder250Bytes](./wallet.md#type-originatordomainnamestringunder250bytes)
1235
1306
 
1236
- #### Property acquireCertificate
1307
+ See also: [Base64String](./wallet.md#type-base64string), [BooleanDefaultFalse](./wallet.md#type-booleandefaultfalse), [DescriptionString5to50Bytes](./wallet.md#type-descriptionstring5to50bytes), [HexString](./wallet.md#type-hexstring), [OutpointString](./wallet.md#type-outpointstring), [PositiveIntegerDefault10Max10000](./wallet.md#type-positiveintegerdefault10max10000), [PositiveIntegerOrZero](./wallet.md#type-positiveintegerorzero), [PubKeyHex](./wallet.md#type-pubkeyhex), [ValidWalletSignerArgs](./wallet.md#interface-validwalletsignerargs)
1237
1308
 
1238
- Acquires an identity certificate, whether by acquiring one from the certifier or by directly receiving it.
1309
+ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
1310
+
1311
+ ---
1312
+ ### Interface: ValidListOutputsArgs
1239
1313
 
1240
1314
  ```ts
1241
- acquireCertificate: (args: AcquireCertificateArgs, originator?: OriginatorDomainNameStringUnder250Bytes) => Promise<WalletCertificate>
1315
+ export interface ValidListOutputsArgs extends ValidWalletSignerArgs {
1316
+ basket: BasketStringUnder300Bytes;
1317
+ tags: OutputTagStringUnder300Bytes[];
1318
+ tagQueryMode: "all" | "any";
1319
+ includeLockingScripts: boolean;
1320
+ includeTransactions: boolean;
1321
+ includeCustomInstructions: BooleanDefaultFalse;
1322
+ includeTags: BooleanDefaultFalse;
1323
+ includeLabels: BooleanDefaultFalse;
1324
+ limit: PositiveIntegerDefault10Max10000;
1325
+ offset: number;
1326
+ seekPermission: BooleanDefaultTrue;
1327
+ knownTxids: string[];
1328
+ }
1242
1329
  ```
1243
- See also: [AcquireCertificateArgs](./wallet.md#interface-acquirecertificateargs), [OriginatorDomainNameStringUnder250Bytes](./wallet.md#type-originatordomainnamestringunder250bytes), [WalletCertificate](./wallet.md#interface-walletcertificate)
1244
1330
 
1245
- #### Property createAction
1331
+ See also: [BasketStringUnder300Bytes](./wallet.md#type-basketstringunder300bytes), [BooleanDefaultFalse](./wallet.md#type-booleandefaultfalse), [BooleanDefaultTrue](./wallet.md#type-booleandefaulttrue), [OutputTagStringUnder300Bytes](./wallet.md#type-outputtagstringunder300bytes), [PositiveIntegerDefault10Max10000](./wallet.md#type-positiveintegerdefault10max10000), [ValidWalletSignerArgs](./wallet.md#interface-validwalletsignerargs)
1246
1332
 
1247
- Creates a new Bitcoin transaction based on the provided inputs, outputs, labels, locks, and other options.
1333
+ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
1334
+
1335
+ ---
1336
+ ### Interface: ValidProcessActionArgs
1248
1337
 
1249
1338
  ```ts
1250
- createAction: (args: CreateActionArgs, originator?: OriginatorDomainNameStringUnder250Bytes) => Promise<CreateActionResult>
1339
+ export interface ValidProcessActionArgs extends ValidWalletSignerArgs {
1340
+ options: ValidProcessActionOptions;
1341
+ isSendWith: boolean;
1342
+ isNewTx: boolean;
1343
+ isRemixChange: boolean;
1344
+ isNoSend: boolean;
1345
+ isDelayed: boolean;
1346
+ isTestWerrReviewActions: boolean;
1347
+ }
1251
1348
  ```
1252
- See also: [CreateActionArgs](./wallet.md#interface-createactionargs), [CreateActionResult](./wallet.md#interface-createactionresult), [OriginatorDomainNameStringUnder250Bytes](./wallet.md#type-originatordomainnamestringunder250bytes)
1253
1349
 
1254
- #### Property createHmac
1350
+ See also: [ValidProcessActionOptions](./wallet.md#interface-validprocessactionoptions), [ValidWalletSignerArgs](./wallet.md#interface-validwalletsignerargs)
1255
1351
 
1256
- Creates an HMAC (Hash-based Message Authentication Code) based on the provided data, protocol, key ID, counterparty, and other factors.
1352
+ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
1353
+
1354
+ ---
1355
+ ### Interface: ValidProcessActionOptions
1257
1356
 
1258
1357
  ```ts
1259
- createHmac: (args: CreateHmacArgs, originator?: OriginatorDomainNameStringUnder250Bytes) => Promise<CreateHmacResult>
1358
+ export interface ValidProcessActionOptions {
1359
+ acceptDelayedBroadcast: BooleanDefaultTrue;
1360
+ returnTXIDOnly: BooleanDefaultFalse;
1361
+ noSend: BooleanDefaultFalse;
1362
+ sendWith: TXIDHexString[];
1363
+ }
1260
1364
  ```
1261
- See also: [CreateHmacArgs](./wallet.md#interface-createhmacargs), [CreateHmacResult](./wallet.md#interface-createhmacresult), [OriginatorDomainNameStringUnder250Bytes](./wallet.md#type-originatordomainnamestringunder250bytes)
1262
1365
 
1263
- #### Property createSignature
1366
+ See also: [BooleanDefaultFalse](./wallet.md#type-booleandefaultfalse), [BooleanDefaultTrue](./wallet.md#type-booleandefaulttrue), [TXIDHexString](./wallet.md#type-txidhexstring)
1264
1367
 
1265
- Creates a digital signature for the provided data or hash using a specific protocol, key, and optionally considering privilege and counterparty.
1368
+ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
1369
+
1370
+ ---
1371
+ ### Interface: ValidProveCertificateArgs
1266
1372
 
1267
1373
  ```ts
1268
- createSignature: (args: CreateSignatureArgs, originator?: OriginatorDomainNameStringUnder250Bytes) => Promise<CreateSignatureResult>
1374
+ export interface ValidProveCertificateArgs extends ValidWalletSignerArgs {
1375
+ type?: Base64String;
1376
+ serialNumber?: Base64String;
1377
+ certifier?: PubKeyHex;
1378
+ subject?: PubKeyHex;
1379
+ revocationOutpoint?: OutpointString;
1380
+ signature?: HexString;
1381
+ fieldsToReveal: CertificateFieldNameUnder50Bytes[];
1382
+ verifier: PubKeyHex;
1383
+ privileged: boolean;
1384
+ privilegedReason?: DescriptionString5to50Bytes;
1385
+ }
1269
1386
  ```
1270
- See also: [CreateSignatureArgs](./wallet.md#interface-createsignatureargs), [CreateSignatureResult](./wallet.md#interface-createsignatureresult), [OriginatorDomainNameStringUnder250Bytes](./wallet.md#type-originatordomainnamestringunder250bytes)
1271
1387
 
1272
- #### Property decrypt
1388
+ See also: [Base64String](./wallet.md#type-base64string), [CertificateFieldNameUnder50Bytes](./wallet.md#type-certificatefieldnameunder50bytes), [DescriptionString5to50Bytes](./wallet.md#type-descriptionstring5to50bytes), [HexString](./wallet.md#type-hexstring), [OutpointString](./wallet.md#type-outpointstring), [PubKeyHex](./wallet.md#type-pubkeyhex), [ValidWalletSignerArgs](./wallet.md#interface-validwalletsignerargs)
1273
1389
 
1274
- Decrypts the provided ciphertext using derived keys, based on the protocol ID, key ID, counterparty, and other factors.
1390
+ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
1391
+
1392
+ ---
1393
+ ### Interface: ValidRelinquishCertificateArgs
1275
1394
 
1276
1395
  ```ts
1277
- decrypt: (args: WalletDecryptArgs, originator?: OriginatorDomainNameStringUnder250Bytes) => Promise<WalletDecryptResult>
1396
+ export interface ValidRelinquishCertificateArgs extends ValidWalletSignerArgs {
1397
+ type: Base64String;
1398
+ serialNumber: Base64String;
1399
+ certifier: PubKeyHex;
1400
+ }
1278
1401
  ```
1279
- See also: [OriginatorDomainNameStringUnder250Bytes](./wallet.md#type-originatordomainnamestringunder250bytes), [WalletDecryptArgs](./wallet.md#interface-walletdecryptargs), [WalletDecryptResult](./wallet.md#interface-walletdecryptresult)
1280
1402
 
1281
- #### Property discoverByAttributes
1403
+ See also: [Base64String](./wallet.md#type-base64string), [PubKeyHex](./wallet.md#type-pubkeyhex), [ValidWalletSignerArgs](./wallet.md#interface-validwalletsignerargs)
1282
1404
 
1283
- Discovers identity certificates belonging to other users, where the documents contain specific attributes, issued by a trusted entity.
1405
+ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
1406
+
1407
+ ---
1408
+ ### Interface: ValidRelinquishOutputArgs
1284
1409
 
1285
1410
  ```ts
1286
- discoverByAttributes: (args: DiscoverByAttributesArgs, originator?: OriginatorDomainNameStringUnder250Bytes) => Promise<DiscoverCertificatesResult>
1411
+ export interface ValidRelinquishOutputArgs extends ValidWalletSignerArgs {
1412
+ basket: BasketStringUnder300Bytes;
1413
+ output: OutpointString;
1414
+ }
1287
1415
  ```
1288
- See also: [DiscoverByAttributesArgs](./wallet.md#interface-discoverbyattributesargs), [DiscoverCertificatesResult](./wallet.md#interface-discovercertificatesresult), [OriginatorDomainNameStringUnder250Bytes](./wallet.md#type-originatordomainnamestringunder250bytes)
1289
1416
 
1290
- #### Property discoverByIdentityKey
1417
+ See also: [BasketStringUnder300Bytes](./wallet.md#type-basketstringunder300bytes), [OutpointString](./wallet.md#type-outpointstring), [ValidWalletSignerArgs](./wallet.md#interface-validwalletsignerargs)
1291
1418
 
1292
- Discovers identity certificates, issued to a given identity key by a trusted entity.
1419
+ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
1420
+
1421
+ ---
1422
+ ### Interface: ValidSignActionArgs
1293
1423
 
1294
1424
  ```ts
1295
- discoverByIdentityKey: (args: DiscoverByIdentityKeyArgs, originator?: OriginatorDomainNameStringUnder250Bytes) => Promise<DiscoverCertificatesResult>
1425
+ export interface ValidSignActionArgs extends ValidProcessActionArgs {
1426
+ spends: Record<PositiveIntegerOrZero, SignActionSpend>;
1427
+ reference: Base64String;
1428
+ options: ValidSignActionOptions;
1429
+ }
1296
1430
  ```
1297
- See also: [DiscoverByIdentityKeyArgs](./wallet.md#interface-discoverbyidentitykeyargs), [DiscoverCertificatesResult](./wallet.md#interface-discovercertificatesresult), [OriginatorDomainNameStringUnder250Bytes](./wallet.md#type-originatordomainnamestringunder250bytes)
1298
1431
 
1299
- #### Property encrypt
1432
+ See also: [Base64String](./wallet.md#type-base64string), [PositiveIntegerOrZero](./wallet.md#type-positiveintegerorzero), [SignActionSpend](./wallet.md#interface-signactionspend), [ValidProcessActionArgs](./wallet.md#interface-validprocessactionargs), [ValidSignActionOptions](./wallet.md#interface-validsignactionoptions)
1300
1433
 
1301
- Encrypts the provided plaintext data using derived keys, based on the protocol ID, key ID, counterparty, and other factors.
1434
+ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
1435
+
1436
+ ---
1437
+ ### Interface: ValidSignActionOptions
1302
1438
 
1303
1439
  ```ts
1304
- encrypt: (args: WalletEncryptArgs, originator?: OriginatorDomainNameStringUnder250Bytes) => Promise<WalletEncryptResult>
1440
+ export interface ValidSignActionOptions extends ValidProcessActionOptions {
1441
+ acceptDelayedBroadcast: boolean;
1442
+ returnTXIDOnly: boolean;
1443
+ noSend: boolean;
1444
+ sendWith: TXIDHexString[];
1445
+ }
1305
1446
  ```
1306
- See also: [OriginatorDomainNameStringUnder250Bytes](./wallet.md#type-originatordomainnamestringunder250bytes), [WalletEncryptArgs](./wallet.md#interface-walletencryptargs), [WalletEncryptResult](./wallet.md#interface-walletencryptresult)
1307
1447
 
1308
- #### Property getHeaderForHeight
1448
+ See also: [TXIDHexString](./wallet.md#type-txidhexstring), [ValidProcessActionOptions](./wallet.md#interface-validprocessactionoptions)
1309
1449
 
1310
- Retrieves the block header of a block at a specified height.
1450
+ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
1451
+
1452
+ ---
1453
+ ### Interface: ValidWalletPayment
1311
1454
 
1312
1455
  ```ts
1313
- getHeaderForHeight: (args: GetHeaderArgs, originator?: OriginatorDomainNameStringUnder250Bytes) => Promise<GetHeaderResult>
1456
+ export interface ValidWalletPayment {
1457
+ derivationPrefix: Base64String;
1458
+ derivationSuffix: Base64String;
1459
+ senderIdentityKey: PubKeyHex;
1460
+ }
1314
1461
  ```
1315
- See also: [GetHeaderArgs](./wallet.md#interface-getheaderargs), [GetHeaderResult](./wallet.md#interface-getheaderresult), [OriginatorDomainNameStringUnder250Bytes](./wallet.md#type-originatordomainnamestringunder250bytes)
1316
1462
 
1317
- #### Property getHeight
1463
+ See also: [Base64String](./wallet.md#type-base64string), [PubKeyHex](./wallet.md#type-pubkeyhex)
1318
1464
 
1319
- Retrieves the current height of the blockchain.
1465
+ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
1466
+
1467
+ ---
1468
+ ### Interface: ValidWalletSignerArgs
1320
1469
 
1321
1470
  ```ts
1322
- getHeight: (args: object, originator?: OriginatorDomainNameStringUnder250Bytes) => Promise<GetHeightResult>
1471
+ export interface ValidWalletSignerArgs {
1472
+ }
1323
1473
  ```
1324
- See also: [GetHeightResult](./wallet.md#interface-getheightresult), [OriginatorDomainNameStringUnder250Bytes](./wallet.md#type-originatordomainnamestringunder250bytes)
1325
1474
 
1326
- #### Property getNetwork
1475
+ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
1327
1476
 
1328
- Retrieves the Bitcoin network the client is using (mainnet or testnet).
1477
+ ---
1478
+ ### Interface: VerifyHmacArgs
1329
1479
 
1330
1480
  ```ts
1331
- getNetwork: (args: object, originator?: OriginatorDomainNameStringUnder250Bytes) => Promise<GetNetworkResult>
1481
+ export interface VerifyHmacArgs extends WalletEncryptionArgs {
1482
+ data: Byte[];
1483
+ hmac: Byte[];
1484
+ }
1332
1485
  ```
1333
- See also: [GetNetworkResult](./wallet.md#interface-getnetworkresult), [OriginatorDomainNameStringUnder250Bytes](./wallet.md#type-originatordomainnamestringunder250bytes)
1334
1486
 
1335
- #### Property getPublicKey
1487
+ See also: [Byte](./wallet.md#type-byte), [WalletEncryptionArgs](./wallet.md#interface-walletencryptionargs)
1336
1488
 
1337
- Retrieves a derived or identity public key based on the requested protocol, key ID, counterparty, and other factors.
1489
+ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
1490
+
1491
+ ---
1492
+ ### Interface: VerifyHmacResult
1338
1493
 
1339
1494
  ```ts
1340
- getPublicKey: (args: GetPublicKeyArgs, originator?: OriginatorDomainNameStringUnder250Bytes) => Promise<GetPublicKeyResult>
1495
+ export interface VerifyHmacResult {
1496
+ valid: true;
1497
+ }
1341
1498
  ```
1342
- See also: [GetPublicKeyArgs](./wallet.md#interface-getpublickeyargs), [GetPublicKeyResult](./wallet.md#interface-getpublickeyresult), [OriginatorDomainNameStringUnder250Bytes](./wallet.md#type-originatordomainnamestringunder250bytes)
1343
1499
 
1344
- #### Property getVersion
1500
+ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
1345
1501
 
1346
- Retrieves the current version string of the wallet.
1502
+ ---
1503
+ ### Interface: VerifySignatureArgs
1347
1504
 
1348
1505
  ```ts
1349
- getVersion: (args: object, originator?: OriginatorDomainNameStringUnder250Bytes) => Promise<GetVersionResult>
1506
+ export interface VerifySignatureArgs extends WalletEncryptionArgs {
1507
+ data?: Byte[];
1508
+ hashToDirectlyVerify?: Byte[];
1509
+ signature: Byte[];
1510
+ forSelf?: BooleanDefaultFalse;
1511
+ }
1350
1512
  ```
1351
- See also: [GetVersionResult](./wallet.md#interface-getversionresult), [OriginatorDomainNameStringUnder250Bytes](./wallet.md#type-originatordomainnamestringunder250bytes)
1352
1513
 
1353
- #### Property internalizeAction
1514
+ See also: [BooleanDefaultFalse](./wallet.md#type-booleandefaultfalse), [Byte](./wallet.md#type-byte), [WalletEncryptionArgs](./wallet.md#interface-walletencryptionargs)
1354
1515
 
1355
- Submits a transaction to be internalized and optionally labeled, outputs paid to the wallet balance, inserted into baskets, and/or tagged.
1516
+ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
1517
+
1518
+ ---
1519
+ ### Interface: VerifySignatureResult
1356
1520
 
1357
1521
  ```ts
1358
- internalizeAction: (args: InternalizeActionArgs, originator?: OriginatorDomainNameStringUnder250Bytes) => Promise<InternalizeActionResult>
1522
+ export interface VerifySignatureResult {
1523
+ valid: true;
1524
+ }
1359
1525
  ```
1360
- See also: [InternalizeActionArgs](./wallet.md#interface-internalizeactionargs), [InternalizeActionResult](./wallet.md#interface-internalizeactionresult), [OriginatorDomainNameStringUnder250Bytes](./wallet.md#type-originatordomainnamestringunder250bytes)
1361
1526
 
1362
- #### Property isAuthenticated
1527
+ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
1363
1528
 
1364
- Checks the authentication status of the user.
1529
+ ---
1530
+ ### Interface: WalletAction
1365
1531
 
1366
1532
  ```ts
1367
- isAuthenticated: (args: object, originator?: OriginatorDomainNameStringUnder250Bytes) => Promise<AuthenticatedResult>
1533
+ export interface WalletAction {
1534
+ txid: TXIDHexString;
1535
+ satoshis: SatoshiValue;
1536
+ status: ActionStatus;
1537
+ isOutgoing: boolean;
1538
+ description: DescriptionString5to50Bytes;
1539
+ labels?: LabelStringUnder300Bytes[];
1540
+ version: PositiveIntegerOrZero;
1541
+ lockTime: PositiveIntegerOrZero;
1542
+ inputs?: WalletActionInput[];
1543
+ outputs?: WalletActionOutput[];
1544
+ }
1368
1545
  ```
1369
- See also: [AuthenticatedResult](./wallet.md#interface-authenticatedresult), [OriginatorDomainNameStringUnder250Bytes](./wallet.md#type-originatordomainnamestringunder250bytes)
1370
1546
 
1371
- #### Property listActions
1547
+ See also: [ActionStatus](./wallet.md#type-actionstatus), [DescriptionString5to50Bytes](./wallet.md#type-descriptionstring5to50bytes), [LabelStringUnder300Bytes](./wallet.md#type-labelstringunder300bytes), [PositiveIntegerOrZero](./wallet.md#type-positiveintegerorzero), [SatoshiValue](./wallet.md#type-satoshivalue), [TXIDHexString](./wallet.md#type-txidhexstring), [WalletActionInput](./wallet.md#interface-walletactioninput), [WalletActionOutput](./wallet.md#interface-walletactionoutput)
1372
1548
 
1373
- Lists all transactions matching the specified labels.
1549
+ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
1550
+
1551
+ ---
1552
+ ### Interface: WalletActionInput
1374
1553
 
1375
1554
  ```ts
1376
- listActions: (args: ListActionsArgs, originator?: OriginatorDomainNameStringUnder250Bytes) => Promise<ListActionsResult>
1555
+ export interface WalletActionInput {
1556
+ sourceOutpoint: OutpointString;
1557
+ sourceSatoshis: SatoshiValue;
1558
+ sourceLockingScript?: HexString;
1559
+ unlockingScript?: HexString;
1560
+ inputDescription: DescriptionString5to50Bytes;
1561
+ sequenceNumber: PositiveIntegerOrZero;
1562
+ }
1377
1563
  ```
1378
- See also: [ListActionsArgs](./wallet.md#interface-listactionsargs), [ListActionsResult](./wallet.md#interface-listactionsresult), [OriginatorDomainNameStringUnder250Bytes](./wallet.md#type-originatordomainnamestringunder250bytes)
1379
1564
 
1380
- #### Property listCertificates
1565
+ See also: [DescriptionString5to50Bytes](./wallet.md#type-descriptionstring5to50bytes), [HexString](./wallet.md#type-hexstring), [OutpointString](./wallet.md#type-outpointstring), [PositiveIntegerOrZero](./wallet.md#type-positiveintegerorzero), [SatoshiValue](./wallet.md#type-satoshivalue)
1381
1566
 
1382
- Lists identity certificates belonging to the user, filtered by certifier(s) and type(s).
1567
+ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
1568
+
1569
+ ---
1570
+ ### Interface: WalletActionOutput
1383
1571
 
1384
1572
  ```ts
1385
- listCertificates: (args: ListCertificatesArgs, originator?: OriginatorDomainNameStringUnder250Bytes) => Promise<ListCertificatesResult>
1573
+ export interface WalletActionOutput {
1574
+ satoshis: SatoshiValue;
1575
+ lockingScript?: HexString;
1576
+ spendable: boolean;
1577
+ customInstructions?: string;
1578
+ tags: OutputTagStringUnder300Bytes[];
1579
+ outputIndex: PositiveIntegerOrZero;
1580
+ outputDescription: DescriptionString5to50Bytes;
1581
+ basket: BasketStringUnder300Bytes;
1582
+ }
1386
1583
  ```
1387
- See also: [ListCertificatesArgs](./wallet.md#interface-listcertificatesargs), [ListCertificatesResult](./wallet.md#interface-listcertificatesresult), [OriginatorDomainNameStringUnder250Bytes](./wallet.md#type-originatordomainnamestringunder250bytes)
1388
1584
 
1389
- #### Property listOutputs
1585
+ See also: [BasketStringUnder300Bytes](./wallet.md#type-basketstringunder300bytes), [DescriptionString5to50Bytes](./wallet.md#type-descriptionstring5to50bytes), [HexString](./wallet.md#type-hexstring), [OutputTagStringUnder300Bytes](./wallet.md#type-outputtagstringunder300bytes), [PositiveIntegerOrZero](./wallet.md#type-positiveintegerorzero), [SatoshiValue](./wallet.md#type-satoshivalue)
1390
1586
 
1391
- Lists the spendable outputs kept within a specific basket, optionally tagged with specific labels.
1587
+ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
1588
+
1589
+ ---
1590
+ ### Interface: WalletCertificate
1392
1591
 
1393
1592
  ```ts
1394
- listOutputs: (args: ListOutputsArgs, originator?: OriginatorDomainNameStringUnder250Bytes) => Promise<ListOutputsResult>
1593
+ export interface WalletCertificate {
1594
+ type: Base64String;
1595
+ subject: PubKeyHex;
1596
+ serialNumber: Base64String;
1597
+ certifier: PubKeyHex;
1598
+ revocationOutpoint: OutpointString;
1599
+ signature: HexString;
1600
+ fields: Record<CertificateFieldNameUnder50Bytes, string>;
1601
+ }
1395
1602
  ```
1396
- See also: [ListOutputsArgs](./wallet.md#interface-listoutputsargs), [ListOutputsResult](./wallet.md#interface-listoutputsresult), [OriginatorDomainNameStringUnder250Bytes](./wallet.md#type-originatordomainnamestringunder250bytes)
1397
1603
 
1398
- #### Property proveCertificate
1604
+ See also: [Base64String](./wallet.md#type-base64string), [CertificateFieldNameUnder50Bytes](./wallet.md#type-certificatefieldnameunder50bytes), [HexString](./wallet.md#type-hexstring), [OutpointString](./wallet.md#type-outpointstring), [PubKeyHex](./wallet.md#type-pubkeyhex)
1399
1605
 
1400
- Proves select fields of an identity certificate, as specified, when requested by a verifier.
1606
+ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
1607
+
1608
+ ---
1609
+ ### Interface: WalletDecryptArgs
1401
1610
 
1402
1611
  ```ts
1403
- proveCertificate: (args: ProveCertificateArgs, originator?: OriginatorDomainNameStringUnder250Bytes) => Promise<ProveCertificateResult>
1612
+ export interface WalletDecryptArgs extends WalletEncryptionArgs {
1613
+ ciphertext: Byte[];
1614
+ }
1404
1615
  ```
1405
- See also: [OriginatorDomainNameStringUnder250Bytes](./wallet.md#type-originatordomainnamestringunder250bytes), [ProveCertificateArgs](./wallet.md#interface-provecertificateargs), [ProveCertificateResult](./wallet.md#interface-provecertificateresult)
1406
1616
 
1407
- #### Property relinquishCertificate
1617
+ See also: [Byte](./wallet.md#type-byte), [WalletEncryptionArgs](./wallet.md#interface-walletencryptionargs)
1408
1618
 
1409
- Relinquishes an identity certificate, removing it from the wallet regardless of whether the revocation outpoint has become spent.
1619
+ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
1620
+
1621
+ ---
1622
+ ### Interface: WalletDecryptResult
1410
1623
 
1411
1624
  ```ts
1412
- relinquishCertificate: (args: RelinquishCertificateArgs, originator?: OriginatorDomainNameStringUnder250Bytes) => Promise<RelinquishCertificateResult>
1625
+ export interface WalletDecryptResult {
1626
+ plaintext: Byte[];
1627
+ }
1413
1628
  ```
1414
- See also: [OriginatorDomainNameStringUnder250Bytes](./wallet.md#type-originatordomainnamestringunder250bytes), [RelinquishCertificateArgs](./wallet.md#interface-relinquishcertificateargs), [RelinquishCertificateResult](./wallet.md#interface-relinquishcertificateresult)
1415
1629
 
1416
- #### Property relinquishOutput
1630
+ See also: [Byte](./wallet.md#type-byte)
1417
1631
 
1418
- Relinquish an output out of a basket, removing it from tracking without spending it.
1632
+ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
1633
+
1634
+ ---
1635
+ ### Interface: WalletEncryptArgs
1419
1636
 
1420
1637
  ```ts
1421
- relinquishOutput: (args: RelinquishOutputArgs, originator?: OriginatorDomainNameStringUnder250Bytes) => Promise<RelinquishOutputResult>
1638
+ export interface WalletEncryptArgs extends WalletEncryptionArgs {
1639
+ plaintext: Byte[];
1640
+ }
1422
1641
  ```
1423
- See also: [OriginatorDomainNameStringUnder250Bytes](./wallet.md#type-originatordomainnamestringunder250bytes), [RelinquishOutputArgs](./wallet.md#interface-relinquishoutputargs), [RelinquishOutputResult](./wallet.md#interface-relinquishoutputresult)
1424
1642
 
1425
- #### Property revealCounterpartyKeyLinkage
1643
+ See also: [Byte](./wallet.md#type-byte), [WalletEncryptionArgs](./wallet.md#interface-walletencryptionargs)
1426
1644
 
1427
- Reveals the key linkage between ourselves and a counterparty, to a particular verifier, across all interactions with the counterparty.
1645
+ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
1646
+
1647
+ ---
1648
+ ### Interface: WalletEncryptResult
1428
1649
 
1429
1650
  ```ts
1430
- revealCounterpartyKeyLinkage: (args: RevealCounterpartyKeyLinkageArgs, originator?: OriginatorDomainNameStringUnder250Bytes) => Promise<RevealCounterpartyKeyLinkageResult>
1651
+ export interface WalletEncryptResult {
1652
+ ciphertext: Byte[];
1653
+ }
1431
1654
  ```
1432
- See also: [OriginatorDomainNameStringUnder250Bytes](./wallet.md#type-originatordomainnamestringunder250bytes), [RevealCounterpartyKeyLinkageArgs](./wallet.md#interface-revealcounterpartykeylinkageargs), [RevealCounterpartyKeyLinkageResult](./wallet.md#interface-revealcounterpartykeylinkageresult)
1433
1655
 
1434
- #### Property revealSpecificKeyLinkage
1656
+ See also: [Byte](./wallet.md#type-byte)
1435
1657
 
1436
- Reveals the key linkage between ourselves and a counterparty, to a particular verifier, with respect to a specific interaction.
1658
+ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
1659
+
1660
+ ---
1661
+ ### Interface: WalletEncryptionArgs
1437
1662
 
1438
1663
  ```ts
1439
- revealSpecificKeyLinkage: (args: RevealSpecificKeyLinkageArgs, originator?: OriginatorDomainNameStringUnder250Bytes) => Promise<RevealSpecificKeyLinkageResult>
1664
+ export interface WalletEncryptionArgs {
1665
+ protocolID: WalletProtocol;
1666
+ keyID: KeyIDStringUnder800Bytes;
1667
+ counterparty?: WalletCounterparty;
1668
+ privileged?: BooleanDefaultFalse;
1669
+ privilegedReason?: DescriptionString5to50Bytes;
1670
+ seekPermission?: BooleanDefaultTrue;
1671
+ }
1440
1672
  ```
1441
- See also: [OriginatorDomainNameStringUnder250Bytes](./wallet.md#type-originatordomainnamestringunder250bytes), [RevealSpecificKeyLinkageArgs](./wallet.md#interface-revealspecifickeylinkageargs), [RevealSpecificKeyLinkageResult](./wallet.md#interface-revealspecifickeylinkageresult)
1442
1673
 
1443
- #### Property signAction
1674
+ See also: [BooleanDefaultFalse](./wallet.md#type-booleandefaultfalse), [BooleanDefaultTrue](./wallet.md#type-booleandefaulttrue), [DescriptionString5to50Bytes](./wallet.md#type-descriptionstring5to50bytes), [KeyIDStringUnder800Bytes](./wallet.md#type-keyidstringunder800bytes), [WalletCounterparty](./wallet.md#type-walletcounterparty), [WalletProtocol](./wallet.md#type-walletprotocol)
1444
1675
 
1445
- Signs a transaction previously created using `createAction`.
1676
+ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
1677
+
1678
+ ---
1679
+ ### Interface: WalletErrorObject
1680
+
1681
+ Every method of the `Wallet` interface has a return value of the form `Promise<object>`.
1682
+ When errors occur, an exception object may be thrown which must conform to the `WalletErrorObject` interface.
1683
+ Serialization layers can rely on the `isError` property being unique to error objects.
1684
+ Deserialization should rethrow `WalletErrorObject` conforming objects.
1446
1685
 
1447
1686
  ```ts
1448
- signAction: (args: SignActionArgs, originator?: OriginatorDomainNameStringUnder250Bytes) => Promise<SignActionResult>
1687
+ export interface WalletErrorObject extends Error {
1688
+ isError: true;
1689
+ }
1449
1690
  ```
1450
- See also: [OriginatorDomainNameStringUnder250Bytes](./wallet.md#type-originatordomainnamestringunder250bytes), [SignActionArgs](./wallet.md#interface-signactionargs), [SignActionResult](./wallet.md#interface-signactionresult)
1451
1691
 
1452
- #### Property verifyHmac
1692
+ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
1453
1693
 
1454
- Verifies an HMAC (Hash-based Message Authentication Code) based on the provided data, protocol, key ID, counterparty, and other factors.
1694
+ ---
1695
+ ### Interface: WalletInterface
1696
+
1697
+ The Wallet interface defines a wallet capable of various tasks including transaction creation and signing,
1698
+ encryption, decryption, identity certificate management, identity verification, and communication
1699
+ with applications as per the BRC standards. This interface allows applications to interact with
1700
+ the wallet for a range of functionalities aligned with the Babbage architectural principles.
1701
+
1702
+ Error Handling
1703
+
1704
+ Every method of the `Wallet` interface has a return value of the form `Promise<object>`.
1705
+ When an error occurs, an exception object may be thrown which must conform to the `WalletErrorObject` interface.
1706
+ Serialization layers can rely on the `isError` property being unique to error objects to
1707
+ deserialize and rethrow `WalletErrorObject` conforming objects.
1455
1708
 
1456
1709
  ```ts
1457
- verifyHmac: (args: VerifyHmacArgs, originator?: OriginatorDomainNameStringUnder250Bytes) => Promise<VerifyHmacResult>
1710
+ export interface WalletInterface {
1711
+ getPublicKey: (args: GetPublicKeyArgs, originator?: OriginatorDomainNameStringUnder250Bytes) => Promise<GetPublicKeyResult>;
1712
+ revealCounterpartyKeyLinkage: (args: RevealCounterpartyKeyLinkageArgs, originator?: OriginatorDomainNameStringUnder250Bytes) => Promise<RevealCounterpartyKeyLinkageResult>;
1713
+ revealSpecificKeyLinkage: (args: RevealSpecificKeyLinkageArgs, originator?: OriginatorDomainNameStringUnder250Bytes) => Promise<RevealSpecificKeyLinkageResult>;
1714
+ encrypt: (args: WalletEncryptArgs, originator?: OriginatorDomainNameStringUnder250Bytes) => Promise<WalletEncryptResult>;
1715
+ decrypt: (args: WalletDecryptArgs, originator?: OriginatorDomainNameStringUnder250Bytes) => Promise<WalletDecryptResult>;
1716
+ createHmac: (args: CreateHmacArgs, originator?: OriginatorDomainNameStringUnder250Bytes) => Promise<CreateHmacResult>;
1717
+ verifyHmac: (args: VerifyHmacArgs, originator?: OriginatorDomainNameStringUnder250Bytes) => Promise<VerifyHmacResult>;
1718
+ createSignature: (args: CreateSignatureArgs, originator?: OriginatorDomainNameStringUnder250Bytes) => Promise<CreateSignatureResult>;
1719
+ verifySignature: (args: VerifySignatureArgs, originator?: OriginatorDomainNameStringUnder250Bytes) => Promise<VerifySignatureResult>;
1720
+ createAction: (args: CreateActionArgs, originator?: OriginatorDomainNameStringUnder250Bytes) => Promise<CreateActionResult>;
1721
+ signAction: (args: SignActionArgs, originator?: OriginatorDomainNameStringUnder250Bytes) => Promise<SignActionResult>;
1722
+ abortAction: (args: AbortActionArgs, originator?: OriginatorDomainNameStringUnder250Bytes) => Promise<AbortActionResult>;
1723
+ listActions: (args: ListActionsArgs, originator?: OriginatorDomainNameStringUnder250Bytes) => Promise<ListActionsResult>;
1724
+ internalizeAction: (args: InternalizeActionArgs, originator?: OriginatorDomainNameStringUnder250Bytes) => Promise<InternalizeActionResult>;
1725
+ listOutputs: (args: ListOutputsArgs, originator?: OriginatorDomainNameStringUnder250Bytes) => Promise<ListOutputsResult>;
1726
+ relinquishOutput: (args: RelinquishOutputArgs, originator?: OriginatorDomainNameStringUnder250Bytes) => Promise<RelinquishOutputResult>;
1727
+ acquireCertificate: (args: AcquireCertificateArgs, originator?: OriginatorDomainNameStringUnder250Bytes) => Promise<WalletCertificate>;
1728
+ listCertificates: (args: ListCertificatesArgs, originator?: OriginatorDomainNameStringUnder250Bytes) => Promise<ListCertificatesResult>;
1729
+ proveCertificate: (args: ProveCertificateArgs, originator?: OriginatorDomainNameStringUnder250Bytes) => Promise<ProveCertificateResult>;
1730
+ relinquishCertificate: (args: RelinquishCertificateArgs, originator?: OriginatorDomainNameStringUnder250Bytes) => Promise<RelinquishCertificateResult>;
1731
+ discoverByIdentityKey: (args: DiscoverByIdentityKeyArgs, originator?: OriginatorDomainNameStringUnder250Bytes) => Promise<DiscoverCertificatesResult>;
1732
+ discoverByAttributes: (args: DiscoverByAttributesArgs, originator?: OriginatorDomainNameStringUnder250Bytes) => Promise<DiscoverCertificatesResult>;
1733
+ isAuthenticated: (args: object, originator?: OriginatorDomainNameStringUnder250Bytes) => Promise<AuthenticatedResult>;
1734
+ waitForAuthentication: (args: object, originator?: OriginatorDomainNameStringUnder250Bytes) => Promise<AuthenticatedResult>;
1735
+ getHeight: (args: object, originator?: OriginatorDomainNameStringUnder250Bytes) => Promise<GetHeightResult>;
1736
+ getHeaderForHeight: (args: GetHeaderArgs, originator?: OriginatorDomainNameStringUnder250Bytes) => Promise<GetHeaderResult>;
1737
+ getNetwork: (args: object, originator?: OriginatorDomainNameStringUnder250Bytes) => Promise<GetNetworkResult>;
1738
+ getVersion: (args: object, originator?: OriginatorDomainNameStringUnder250Bytes) => Promise<GetVersionResult>;
1739
+ }
1458
1740
  ```
1459
- See also: [OriginatorDomainNameStringUnder250Bytes](./wallet.md#type-originatordomainnamestringunder250bytes), [VerifyHmacArgs](./wallet.md#interface-verifyhmacargs), [VerifyHmacResult](./wallet.md#interface-verifyhmacresult)
1460
1741
 
1461
- #### Property verifySignature
1742
+ See also: [AbortActionArgs](./wallet.md#interface-abortactionargs), [AbortActionResult](./wallet.md#interface-abortactionresult), [AcquireCertificateArgs](./wallet.md#interface-acquirecertificateargs), [AuthenticatedResult](./wallet.md#interface-authenticatedresult), [CreateActionArgs](./wallet.md#interface-createactionargs), [CreateActionResult](./wallet.md#interface-createactionresult), [CreateHmacArgs](./wallet.md#interface-createhmacargs), [CreateHmacResult](./wallet.md#interface-createhmacresult), [CreateSignatureArgs](./wallet.md#interface-createsignatureargs), [CreateSignatureResult](./wallet.md#interface-createsignatureresult), [DiscoverByAttributesArgs](./wallet.md#interface-discoverbyattributesargs), [DiscoverByIdentityKeyArgs](./wallet.md#interface-discoverbyidentitykeyargs), [DiscoverCertificatesResult](./wallet.md#interface-discovercertificatesresult), [GetHeaderArgs](./wallet.md#interface-getheaderargs), [GetHeaderResult](./wallet.md#interface-getheaderresult), [GetHeightResult](./wallet.md#interface-getheightresult), [GetNetworkResult](./wallet.md#interface-getnetworkresult), [GetPublicKeyArgs](./wallet.md#interface-getpublickeyargs), [GetPublicKeyResult](./wallet.md#interface-getpublickeyresult), [GetVersionResult](./wallet.md#interface-getversionresult), [InternalizeActionArgs](./wallet.md#interface-internalizeactionargs), [InternalizeActionResult](./wallet.md#interface-internalizeactionresult), [ListActionsArgs](./wallet.md#interface-listactionsargs), [ListActionsResult](./wallet.md#interface-listactionsresult), [ListCertificatesArgs](./wallet.md#interface-listcertificatesargs), [ListCertificatesResult](./wallet.md#interface-listcertificatesresult), [ListOutputsArgs](./wallet.md#interface-listoutputsargs), [ListOutputsResult](./wallet.md#interface-listoutputsresult), [OriginatorDomainNameStringUnder250Bytes](./wallet.md#type-originatordomainnamestringunder250bytes), [ProveCertificateArgs](./wallet.md#interface-provecertificateargs), [ProveCertificateResult](./wallet.md#interface-provecertificateresult), [RelinquishCertificateArgs](./wallet.md#interface-relinquishcertificateargs), [RelinquishCertificateResult](./wallet.md#interface-relinquishcertificateresult), [RelinquishOutputArgs](./wallet.md#interface-relinquishoutputargs), [RelinquishOutputResult](./wallet.md#interface-relinquishoutputresult), [RevealCounterpartyKeyLinkageArgs](./wallet.md#interface-revealcounterpartykeylinkageargs), [RevealCounterpartyKeyLinkageResult](./wallet.md#interface-revealcounterpartykeylinkageresult), [RevealSpecificKeyLinkageArgs](./wallet.md#interface-revealspecifickeylinkageargs), [RevealSpecificKeyLinkageResult](./wallet.md#interface-revealspecifickeylinkageresult), [SignActionArgs](./wallet.md#interface-signactionargs), [SignActionResult](./wallet.md#interface-signactionresult), [VerifyHmacArgs](./wallet.md#interface-verifyhmacargs), [VerifyHmacResult](./wallet.md#interface-verifyhmacresult), [VerifySignatureArgs](./wallet.md#interface-verifysignatureargs), [VerifySignatureResult](./wallet.md#interface-verifysignatureresult), [WalletCertificate](./wallet.md#interface-walletcertificate), [WalletDecryptArgs](./wallet.md#interface-walletdecryptargs), [WalletDecryptResult](./wallet.md#interface-walletdecryptresult), [WalletEncryptArgs](./wallet.md#interface-walletencryptargs), [WalletEncryptResult](./wallet.md#interface-walletencryptresult), [decrypt](./messages.md#variable-decrypt), [encrypt](./messages.md#variable-encrypt)
1462
1743
 
1463
- Verifies a digital signature for the provided data or hash using a specific protocol, key, and optionally considering privilege and counterparty.
1744
+ #### Property abortAction
1745
+
1746
+ Aborts a transaction that is in progress and has not yet been finalized or sent to the network.
1464
1747
 
1465
1748
  ```ts
1466
- verifySignature: (args: VerifySignatureArgs, originator?: OriginatorDomainNameStringUnder250Bytes) => Promise<VerifySignatureResult>
1749
+ abortAction: (args: AbortActionArgs, originator?: OriginatorDomainNameStringUnder250Bytes) => Promise<AbortActionResult>
1467
1750
  ```
1468
- See also: [OriginatorDomainNameStringUnder250Bytes](./wallet.md#type-originatordomainnamestringunder250bytes), [VerifySignatureArgs](./wallet.md#interface-verifysignatureargs), [VerifySignatureResult](./wallet.md#interface-verifysignatureresult)
1751
+ See also: [AbortActionArgs](./wallet.md#interface-abortactionargs), [AbortActionResult](./wallet.md#interface-abortactionresult), [OriginatorDomainNameStringUnder250Bytes](./wallet.md#type-originatordomainnamestringunder250bytes)
1469
1752
 
1470
- #### Property waitForAuthentication
1753
+ #### Property acquireCertificate
1471
1754
 
1472
- Continuously waits until the user is authenticated, returning the result once confirmed.
1755
+ Acquires an identity certificate, whether by acquiring one from the certifier or by directly receiving it.
1473
1756
 
1474
1757
  ```ts
1475
- waitForAuthentication: (args: object, originator?: OriginatorDomainNameStringUnder250Bytes) => Promise<AuthenticatedResult>
1758
+ acquireCertificate: (args: AcquireCertificateArgs, originator?: OriginatorDomainNameStringUnder250Bytes) => Promise<WalletCertificate>
1476
1759
  ```
1477
- See also: [AuthenticatedResult](./wallet.md#interface-authenticatedresult), [OriginatorDomainNameStringUnder250Bytes](./wallet.md#type-originatordomainnamestringunder250bytes)
1760
+ See also: [AcquireCertificateArgs](./wallet.md#interface-acquirecertificateargs), [OriginatorDomainNameStringUnder250Bytes](./wallet.md#type-originatordomainnamestringunder250bytes), [WalletCertificate](./wallet.md#interface-walletcertificate)
1478
1761
 
1479
- Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
1762
+ #### Property createAction
1480
1763
 
1481
- ---
1482
- ### Interface: WalletOutput
1764
+ Creates a new Bitcoin transaction based on the provided inputs, outputs, labels, locks, and other options.
1483
1765
 
1484
1766
  ```ts
1485
- export interface WalletOutput {
1486
- satoshis: SatoshiValue;
1487
- lockingScript?: HexString;
1488
- spendable: boolean;
1489
- customInstructions?: string;
1490
- tags?: OutputTagStringUnder300Bytes[];
1491
- outpoint: OutpointString;
1492
- labels?: LabelStringUnder300Bytes[];
1493
- }
1767
+ createAction: (args: CreateActionArgs, originator?: OriginatorDomainNameStringUnder250Bytes) => Promise<CreateActionResult>
1494
1768
  ```
1769
+ See also: [CreateActionArgs](./wallet.md#interface-createactionargs), [CreateActionResult](./wallet.md#interface-createactionresult), [OriginatorDomainNameStringUnder250Bytes](./wallet.md#type-originatordomainnamestringunder250bytes)
1495
1770
 
1496
- See also: [HexString](./wallet.md#type-hexstring), [LabelStringUnder300Bytes](./wallet.md#type-labelstringunder300bytes), [OutpointString](./wallet.md#type-outpointstring), [OutputTagStringUnder300Bytes](./wallet.md#type-outputtagstringunder300bytes), [SatoshiValue](./wallet.md#type-satoshivalue)
1497
-
1498
- Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
1771
+ #### Property createHmac
1499
1772
 
1500
- ---
1501
- ### Interface: WalletPayment
1773
+ Creates an HMAC (Hash-based Message Authentication Code) based on the provided data, protocol, key ID, counterparty, and other factors.
1502
1774
 
1503
1775
  ```ts
1504
- export interface WalletPayment {
1505
- derivationPrefix: Base64String;
1506
- derivationSuffix: Base64String;
1507
- senderIdentityKey: PubKeyHex;
1508
- }
1776
+ createHmac: (args: CreateHmacArgs, originator?: OriginatorDomainNameStringUnder250Bytes) => Promise<CreateHmacResult>
1509
1777
  ```
1778
+ See also: [CreateHmacArgs](./wallet.md#interface-createhmacargs), [CreateHmacResult](./wallet.md#interface-createhmacresult), [OriginatorDomainNameStringUnder250Bytes](./wallet.md#type-originatordomainnamestringunder250bytes)
1510
1779
 
1511
- See also: [Base64String](./wallet.md#type-base64string), [PubKeyHex](./wallet.md#type-pubkeyhex)
1780
+ #### Property createSignature
1512
1781
 
1513
- Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
1782
+ Creates a digital signature for the provided data or hash using a specific protocol, key, and optionally considering privilege and counterparty.
1514
1783
 
1515
- ---
1516
- ### Interface: WalletWire
1784
+ ```ts
1785
+ createSignature: (args: CreateSignatureArgs, originator?: OriginatorDomainNameStringUnder250Bytes) => Promise<CreateSignatureResult>
1786
+ ```
1787
+ See also: [CreateSignatureArgs](./wallet.md#interface-createsignatureargs), [CreateSignatureResult](./wallet.md#interface-createsignatureresult), [OriginatorDomainNameStringUnder250Bytes](./wallet.md#type-originatordomainnamestringunder250bytes)
1517
1788
 
1518
- A Wallet Wire is an abstraction over a raw transport medium where binary data can be sent to and subsequently received from a wallet.
1789
+ #### Property decrypt
1790
+
1791
+ Decrypts the provided ciphertext using derived keys, based on the protocol ID, key ID, counterparty, and other factors.
1519
1792
 
1520
1793
  ```ts
1521
- export default interface WalletWire {
1522
- transmitToWallet: (message: number[]) => Promise<number[]>;
1523
- }
1794
+ decrypt: (args: WalletDecryptArgs, originator?: OriginatorDomainNameStringUnder250Bytes) => Promise<WalletDecryptResult>
1524
1795
  ```
1796
+ See also: [OriginatorDomainNameStringUnder250Bytes](./wallet.md#type-originatordomainnamestringunder250bytes), [WalletDecryptArgs](./wallet.md#interface-walletdecryptargs), [WalletDecryptResult](./wallet.md#interface-walletdecryptresult)
1525
1797
 
1526
- Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
1798
+ #### Property discoverByAttributes
1527
1799
 
1528
- ---
1529
- ## Classes
1800
+ Discovers identity certificates belonging to other users, where the documents contain specific attributes, issued by a trusted entity.
1530
1801
 
1531
- | | |
1532
- | --- | --- |
1533
- | [CachedKeyDeriver](#class-cachedkeyderiver) | [WalletClient](#class-walletclient) |
1534
- | [HTTPWalletJSON](#class-httpwalletjson) | [WalletError](#class-walleterror) |
1535
- | [HTTPWalletWire](#class-httpwalletwire) | [WalletWireProcessor](#class-walletwireprocessor) |
1536
- | [KeyDeriver](#class-keyderiver) | [WalletWireTransceiver](#class-walletwiretransceiver) |
1537
- | [ProtoWallet](#class-protowallet) | [WindowCWISubstrate](#class-windowcwisubstrate) |
1538
- | [ReactNativeWebView](#class-reactnativewebview) | [XDMSubstrate](#class-xdmsubstrate) |
1539
- | [WERR_REVIEW_ACTIONS](#class-werr_review_actions) | |
1802
+ ```ts
1803
+ discoverByAttributes: (args: DiscoverByAttributesArgs, originator?: OriginatorDomainNameStringUnder250Bytes) => Promise<DiscoverCertificatesResult>
1804
+ ```
1805
+ See also: [DiscoverByAttributesArgs](./wallet.md#interface-discoverbyattributesargs), [DiscoverCertificatesResult](./wallet.md#interface-discovercertificatesresult), [OriginatorDomainNameStringUnder250Bytes](./wallet.md#type-originatordomainnamestringunder250bytes)
1540
1806
 
1541
- Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
1807
+ #### Property discoverByIdentityKey
1542
1808
 
1543
- ---
1809
+ Discovers identity certificates, issued to a given identity key by a trusted entity.
1544
1810
 
1545
- ### Class: CachedKeyDeriver
1811
+ ```ts
1812
+ discoverByIdentityKey: (args: DiscoverByIdentityKeyArgs, originator?: OriginatorDomainNameStringUnder250Bytes) => Promise<DiscoverCertificatesResult>
1813
+ ```
1814
+ See also: [DiscoverByIdentityKeyArgs](./wallet.md#interface-discoverbyidentitykeyargs), [DiscoverCertificatesResult](./wallet.md#interface-discovercertificatesresult), [OriginatorDomainNameStringUnder250Bytes](./wallet.md#type-originatordomainnamestringunder250bytes)
1546
1815
 
1547
- A cached version of KeyDeriver that caches the results of key derivation methods.
1548
- This is useful for optimizing performance when the same keys are derived multiple times.
1549
- It supports configurable cache size with sane defaults and maintains cache entries using LRU (Least Recently Used) eviction policy.
1816
+ #### Property encrypt
1817
+
1818
+ Encrypts the provided plaintext data using derived keys, based on the protocol ID, key ID, counterparty, and other factors.
1550
1819
 
1551
1820
  ```ts
1552
- export default class CachedKeyDeriver implements KeyDeriverApi {
1553
- rootKey: PrivateKey;
1554
- identityKey: string;
1555
- constructor(rootKey: PrivateKey | "anyone", options?: {
1556
- maxCacheSize?: number;
1557
- })
1558
- derivePublicKey(protocolID: WalletProtocol, keyID: string, counterparty: Counterparty, forSelf: boolean = false): PublicKey
1559
- derivePrivateKey(protocolID: WalletProtocol, keyID: string, counterparty: Counterparty): PrivateKey
1560
- deriveSymmetricKey(protocolID: WalletProtocol, keyID: string, counterparty: Counterparty): SymmetricKey
1561
- revealCounterpartySecret(counterparty: Counterparty): number[]
1562
- revealSpecificSecret(counterparty: Counterparty, protocolID: WalletProtocol, keyID: string): number[]
1563
- }
1821
+ encrypt: (args: WalletEncryptArgs, originator?: OriginatorDomainNameStringUnder250Bytes) => Promise<WalletEncryptResult>
1564
1822
  ```
1823
+ See also: [OriginatorDomainNameStringUnder250Bytes](./wallet.md#type-originatordomainnamestringunder250bytes), [WalletEncryptArgs](./wallet.md#interface-walletencryptargs), [WalletEncryptResult](./wallet.md#interface-walletencryptresult)
1565
1824
 
1566
- See also: [Counterparty](./wallet.md#type-counterparty), [KeyDeriverApi](./wallet.md#interface-keyderiverapi), [PrivateKey](./primitives.md#class-privatekey), [PublicKey](./primitives.md#class-publickey), [SymmetricKey](./primitives.md#class-symmetrickey), [WalletProtocol](./wallet.md#type-walletprotocol)
1567
-
1568
- #### Constructor
1825
+ #### Property getHeaderForHeight
1569
1826
 
1570
- Initializes the CachedKeyDeriver instance with a root private key and optional cache settings.
1827
+ Retrieves the block header of a block at a specified height.
1571
1828
 
1572
1829
  ```ts
1573
- constructor(rootKey: PrivateKey | "anyone", options?: {
1574
- maxCacheSize?: number;
1575
- })
1830
+ getHeaderForHeight: (args: GetHeaderArgs, originator?: OriginatorDomainNameStringUnder250Bytes) => Promise<GetHeaderResult>
1576
1831
  ```
1577
- See also: [PrivateKey](./primitives.md#class-privatekey)
1832
+ See also: [GetHeaderArgs](./wallet.md#interface-getheaderargs), [GetHeaderResult](./wallet.md#interface-getheaderresult), [OriginatorDomainNameStringUnder250Bytes](./wallet.md#type-originatordomainnamestringunder250bytes)
1578
1833
 
1579
- Argument Details
1834
+ #### Property getHeight
1580
1835
 
1581
- + **rootKey**
1582
- + The root private key or the string 'anyone'.
1583
- + **options**
1584
- + Optional settings for the cache.
1836
+ Retrieves the current height of the blockchain.
1585
1837
 
1586
- #### Property identityKey
1838
+ ```ts
1839
+ getHeight: (args: object, originator?: OriginatorDomainNameStringUnder250Bytes) => Promise<GetHeightResult>
1840
+ ```
1841
+ See also: [GetHeightResult](./wallet.md#interface-getheightresult), [OriginatorDomainNameStringUnder250Bytes](./wallet.md#type-originatordomainnamestringunder250bytes)
1587
1842
 
1588
- The identity of this key deriver which is normally the public key associated with the `rootKey`
1843
+ #### Property getNetwork
1844
+
1845
+ Retrieves the Bitcoin network the client is using (mainnet or testnet).
1589
1846
 
1590
1847
  ```ts
1591
- identityKey: string
1848
+ getNetwork: (args: object, originator?: OriginatorDomainNameStringUnder250Bytes) => Promise<GetNetworkResult>
1592
1849
  ```
1850
+ See also: [GetNetworkResult](./wallet.md#interface-getnetworkresult), [OriginatorDomainNameStringUnder250Bytes](./wallet.md#type-originatordomainnamestringunder250bytes)
1593
1851
 
1594
- #### Property rootKey
1852
+ #### Property getPublicKey
1595
1853
 
1596
- The root key from which all other keys are derived.
1854
+ Retrieves a derived or identity public key based on the requested protocol, key ID, counterparty, and other factors.
1597
1855
 
1598
1856
  ```ts
1599
- rootKey: PrivateKey
1857
+ getPublicKey: (args: GetPublicKeyArgs, originator?: OriginatorDomainNameStringUnder250Bytes) => Promise<GetPublicKeyResult>
1600
1858
  ```
1601
- See also: [PrivateKey](./primitives.md#class-privatekey)
1859
+ See also: [GetPublicKeyArgs](./wallet.md#interface-getpublickeyargs), [GetPublicKeyResult](./wallet.md#interface-getpublickeyresult), [OriginatorDomainNameStringUnder250Bytes](./wallet.md#type-originatordomainnamestringunder250bytes)
1602
1860
 
1603
- #### Method derivePrivateKey
1861
+ #### Property getVersion
1604
1862
 
1605
- Derives a private key based on protocol ID, key ID, and counterparty.
1606
- Caches the result for future calls with the same parameters.
1863
+ Retrieves the current version string of the wallet.
1607
1864
 
1608
1865
  ```ts
1609
- derivePrivateKey(protocolID: WalletProtocol, keyID: string, counterparty: Counterparty): PrivateKey
1866
+ getVersion: (args: object, originator?: OriginatorDomainNameStringUnder250Bytes) => Promise<GetVersionResult>
1610
1867
  ```
1611
- See also: [Counterparty](./wallet.md#type-counterparty), [PrivateKey](./primitives.md#class-privatekey), [WalletProtocol](./wallet.md#type-walletprotocol)
1612
-
1613
- Returns
1868
+ See also: [GetVersionResult](./wallet.md#interface-getversionresult), [OriginatorDomainNameStringUnder250Bytes](./wallet.md#type-originatordomainnamestringunder250bytes)
1614
1869
 
1615
- - The derived private key.
1870
+ #### Property internalizeAction
1616
1871
 
1617
- Argument Details
1872
+ Submits a transaction to be internalized and optionally labeled, outputs paid to the wallet balance, inserted into baskets, and/or tagged.
1618
1873
 
1619
- + **protocolID**
1620
- + The protocol ID including a security level and protocol name.
1621
- + **keyID**
1622
- + The key identifier.
1623
- + **counterparty**
1624
- + The counterparty's public key or a predefined value ('self' or 'anyone').
1874
+ ```ts
1875
+ internalizeAction: (args: InternalizeActionArgs, originator?: OriginatorDomainNameStringUnder250Bytes) => Promise<InternalizeActionResult>
1876
+ ```
1877
+ See also: [InternalizeActionArgs](./wallet.md#interface-internalizeactionargs), [InternalizeActionResult](./wallet.md#interface-internalizeactionresult), [OriginatorDomainNameStringUnder250Bytes](./wallet.md#type-originatordomainnamestringunder250bytes)
1625
1878
 
1626
- #### Method derivePublicKey
1879
+ #### Property isAuthenticated
1627
1880
 
1628
- Derives a public key based on protocol ID, key ID, and counterparty.
1629
- Caches the result for future calls with the same parameters.
1881
+ Checks the authentication status of the user.
1630
1882
 
1631
1883
  ```ts
1632
- derivePublicKey(protocolID: WalletProtocol, keyID: string, counterparty: Counterparty, forSelf: boolean = false): PublicKey
1884
+ isAuthenticated: (args: object, originator?: OriginatorDomainNameStringUnder250Bytes) => Promise<AuthenticatedResult>
1633
1885
  ```
1634
- See also: [Counterparty](./wallet.md#type-counterparty), [PublicKey](./primitives.md#class-publickey), [WalletProtocol](./wallet.md#type-walletprotocol)
1886
+ See also: [AuthenticatedResult](./wallet.md#interface-authenticatedresult), [OriginatorDomainNameStringUnder250Bytes](./wallet.md#type-originatordomainnamestringunder250bytes)
1635
1887
 
1636
- Returns
1888
+ #### Property listActions
1637
1889
 
1638
- - The derived public key.
1890
+ Lists all transactions matching the specified labels.
1639
1891
 
1640
- Argument Details
1892
+ ```ts
1893
+ listActions: (args: ListActionsArgs, originator?: OriginatorDomainNameStringUnder250Bytes) => Promise<ListActionsResult>
1894
+ ```
1895
+ See also: [ListActionsArgs](./wallet.md#interface-listactionsargs), [ListActionsResult](./wallet.md#interface-listactionsresult), [OriginatorDomainNameStringUnder250Bytes](./wallet.md#type-originatordomainnamestringunder250bytes)
1641
1896
 
1642
- + **protocolID**
1897
+ #### Property listCertificates
1898
+
1899
+ Lists identity certificates belonging to the user, filtered by certifier(s) and type(s).
1900
+
1901
+ ```ts
1902
+ listCertificates: (args: ListCertificatesArgs, originator?: OriginatorDomainNameStringUnder250Bytes) => Promise<ListCertificatesResult>
1903
+ ```
1904
+ See also: [ListCertificatesArgs](./wallet.md#interface-listcertificatesargs), [ListCertificatesResult](./wallet.md#interface-listcertificatesresult), [OriginatorDomainNameStringUnder250Bytes](./wallet.md#type-originatordomainnamestringunder250bytes)
1905
+
1906
+ #### Property listOutputs
1907
+
1908
+ Lists the spendable outputs kept within a specific basket, optionally tagged with specific labels.
1909
+
1910
+ ```ts
1911
+ listOutputs: (args: ListOutputsArgs, originator?: OriginatorDomainNameStringUnder250Bytes) => Promise<ListOutputsResult>
1912
+ ```
1913
+ See also: [ListOutputsArgs](./wallet.md#interface-listoutputsargs), [ListOutputsResult](./wallet.md#interface-listoutputsresult), [OriginatorDomainNameStringUnder250Bytes](./wallet.md#type-originatordomainnamestringunder250bytes)
1914
+
1915
+ #### Property proveCertificate
1916
+
1917
+ Proves select fields of an identity certificate, as specified, when requested by a verifier.
1918
+
1919
+ ```ts
1920
+ proveCertificate: (args: ProveCertificateArgs, originator?: OriginatorDomainNameStringUnder250Bytes) => Promise<ProveCertificateResult>
1921
+ ```
1922
+ See also: [OriginatorDomainNameStringUnder250Bytes](./wallet.md#type-originatordomainnamestringunder250bytes), [ProveCertificateArgs](./wallet.md#interface-provecertificateargs), [ProveCertificateResult](./wallet.md#interface-provecertificateresult)
1923
+
1924
+ #### Property relinquishCertificate
1925
+
1926
+ Relinquishes an identity certificate, removing it from the wallet regardless of whether the revocation outpoint has become spent.
1927
+
1928
+ ```ts
1929
+ relinquishCertificate: (args: RelinquishCertificateArgs, originator?: OriginatorDomainNameStringUnder250Bytes) => Promise<RelinquishCertificateResult>
1930
+ ```
1931
+ See also: [OriginatorDomainNameStringUnder250Bytes](./wallet.md#type-originatordomainnamestringunder250bytes), [RelinquishCertificateArgs](./wallet.md#interface-relinquishcertificateargs), [RelinquishCertificateResult](./wallet.md#interface-relinquishcertificateresult)
1932
+
1933
+ #### Property relinquishOutput
1934
+
1935
+ Relinquish an output out of a basket, removing it from tracking without spending it.
1936
+
1937
+ ```ts
1938
+ relinquishOutput: (args: RelinquishOutputArgs, originator?: OriginatorDomainNameStringUnder250Bytes) => Promise<RelinquishOutputResult>
1939
+ ```
1940
+ See also: [OriginatorDomainNameStringUnder250Bytes](./wallet.md#type-originatordomainnamestringunder250bytes), [RelinquishOutputArgs](./wallet.md#interface-relinquishoutputargs), [RelinquishOutputResult](./wallet.md#interface-relinquishoutputresult)
1941
+
1942
+ #### Property revealCounterpartyKeyLinkage
1943
+
1944
+ Reveals the key linkage between ourselves and a counterparty, to a particular verifier, across all interactions with the counterparty.
1945
+
1946
+ ```ts
1947
+ revealCounterpartyKeyLinkage: (args: RevealCounterpartyKeyLinkageArgs, originator?: OriginatorDomainNameStringUnder250Bytes) => Promise<RevealCounterpartyKeyLinkageResult>
1948
+ ```
1949
+ See also: [OriginatorDomainNameStringUnder250Bytes](./wallet.md#type-originatordomainnamestringunder250bytes), [RevealCounterpartyKeyLinkageArgs](./wallet.md#interface-revealcounterpartykeylinkageargs), [RevealCounterpartyKeyLinkageResult](./wallet.md#interface-revealcounterpartykeylinkageresult)
1950
+
1951
+ #### Property revealSpecificKeyLinkage
1952
+
1953
+ Reveals the key linkage between ourselves and a counterparty, to a particular verifier, with respect to a specific interaction.
1954
+
1955
+ ```ts
1956
+ revealSpecificKeyLinkage: (args: RevealSpecificKeyLinkageArgs, originator?: OriginatorDomainNameStringUnder250Bytes) => Promise<RevealSpecificKeyLinkageResult>
1957
+ ```
1958
+ See also: [OriginatorDomainNameStringUnder250Bytes](./wallet.md#type-originatordomainnamestringunder250bytes), [RevealSpecificKeyLinkageArgs](./wallet.md#interface-revealspecifickeylinkageargs), [RevealSpecificKeyLinkageResult](./wallet.md#interface-revealspecifickeylinkageresult)
1959
+
1960
+ #### Property signAction
1961
+
1962
+ Signs a transaction previously created using `createAction`.
1963
+
1964
+ ```ts
1965
+ signAction: (args: SignActionArgs, originator?: OriginatorDomainNameStringUnder250Bytes) => Promise<SignActionResult>
1966
+ ```
1967
+ See also: [OriginatorDomainNameStringUnder250Bytes](./wallet.md#type-originatordomainnamestringunder250bytes), [SignActionArgs](./wallet.md#interface-signactionargs), [SignActionResult](./wallet.md#interface-signactionresult)
1968
+
1969
+ #### Property verifyHmac
1970
+
1971
+ Verifies an HMAC (Hash-based Message Authentication Code) based on the provided data, protocol, key ID, counterparty, and other factors.
1972
+
1973
+ ```ts
1974
+ verifyHmac: (args: VerifyHmacArgs, originator?: OriginatorDomainNameStringUnder250Bytes) => Promise<VerifyHmacResult>
1975
+ ```
1976
+ See also: [OriginatorDomainNameStringUnder250Bytes](./wallet.md#type-originatordomainnamestringunder250bytes), [VerifyHmacArgs](./wallet.md#interface-verifyhmacargs), [VerifyHmacResult](./wallet.md#interface-verifyhmacresult)
1977
+
1978
+ #### Property verifySignature
1979
+
1980
+ Verifies a digital signature for the provided data or hash using a specific protocol, key, and optionally considering privilege and counterparty.
1981
+
1982
+ ```ts
1983
+ verifySignature: (args: VerifySignatureArgs, originator?: OriginatorDomainNameStringUnder250Bytes) => Promise<VerifySignatureResult>
1984
+ ```
1985
+ See also: [OriginatorDomainNameStringUnder250Bytes](./wallet.md#type-originatordomainnamestringunder250bytes), [VerifySignatureArgs](./wallet.md#interface-verifysignatureargs), [VerifySignatureResult](./wallet.md#interface-verifysignatureresult)
1986
+
1987
+ #### Property waitForAuthentication
1988
+
1989
+ Continuously waits until the user is authenticated, returning the result once confirmed.
1990
+
1991
+ ```ts
1992
+ waitForAuthentication: (args: object, originator?: OriginatorDomainNameStringUnder250Bytes) => Promise<AuthenticatedResult>
1993
+ ```
1994
+ See also: [AuthenticatedResult](./wallet.md#interface-authenticatedresult), [OriginatorDomainNameStringUnder250Bytes](./wallet.md#type-originatordomainnamestringunder250bytes)
1995
+
1996
+ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
1997
+
1998
+ ---
1999
+ ### Interface: WalletOutput
2000
+
2001
+ ```ts
2002
+ export interface WalletOutput {
2003
+ satoshis: SatoshiValue;
2004
+ lockingScript?: HexString;
2005
+ spendable: boolean;
2006
+ customInstructions?: string;
2007
+ tags?: OutputTagStringUnder300Bytes[];
2008
+ outpoint: OutpointString;
2009
+ labels?: LabelStringUnder300Bytes[];
2010
+ }
2011
+ ```
2012
+
2013
+ See also: [HexString](./wallet.md#type-hexstring), [LabelStringUnder300Bytes](./wallet.md#type-labelstringunder300bytes), [OutpointString](./wallet.md#type-outpointstring), [OutputTagStringUnder300Bytes](./wallet.md#type-outputtagstringunder300bytes), [SatoshiValue](./wallet.md#type-satoshivalue)
2014
+
2015
+ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
2016
+
2017
+ ---
2018
+ ### Interface: WalletPayment
2019
+
2020
+ ```ts
2021
+ export interface WalletPayment {
2022
+ derivationPrefix: Base64String;
2023
+ derivationSuffix: Base64String;
2024
+ senderIdentityKey: PubKeyHex;
2025
+ }
2026
+ ```
2027
+
2028
+ See also: [Base64String](./wallet.md#type-base64string), [PubKeyHex](./wallet.md#type-pubkeyhex)
2029
+
2030
+ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
2031
+
2032
+ ---
2033
+ ### Interface: WalletWire
2034
+
2035
+ A Wallet Wire is an abstraction over a raw transport medium where binary data can be sent to and subsequently received from a wallet.
2036
+
2037
+ ```ts
2038
+ export default interface WalletWire {
2039
+ transmitToWallet: (message: number[]) => Promise<number[]>;
2040
+ }
2041
+ ```
2042
+
2043
+ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
2044
+
2045
+ ---
2046
+ ## Classes
2047
+
2048
+ | | |
2049
+ | --- | --- |
2050
+ | [CachedKeyDeriver](#class-cachedkeyderiver) | [WERR_REVIEW_ACTIONS](#class-werr_review_actions) |
2051
+ | [HTTPWalletJSON](#class-httpwalletjson) | [WalletClient](#class-walletclient) |
2052
+ | [HTTPWalletWire](#class-httpwalletwire) | [WalletError](#class-walleterror) |
2053
+ | [KeyDeriver](#class-keyderiver) | [WalletWireProcessor](#class-walletwireprocessor) |
2054
+ | [ProtoWallet](#class-protowallet) | [WalletWireTransceiver](#class-walletwiretransceiver) |
2055
+ | [ReactNativeWebView](#class-reactnativewebview) | [WindowCWISubstrate](#class-windowcwisubstrate) |
2056
+ | [WERR_INSUFFICIENT_FUNDS](#class-werr_insufficient_funds) | [XDMSubstrate](#class-xdmsubstrate) |
2057
+ | [WERR_INVALID_PARAMETER](#class-werr_invalid_parameter) | |
2058
+
2059
+ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
2060
+
2061
+ ---
2062
+
2063
+ ### Class: CachedKeyDeriver
2064
+
2065
+ A cached version of KeyDeriver that caches the results of key derivation methods.
2066
+ This is useful for optimizing performance when the same keys are derived multiple times.
2067
+ It supports configurable cache size with sane defaults and maintains cache entries using LRU (Least Recently Used) eviction policy.
2068
+
2069
+ ```ts
2070
+ export default class CachedKeyDeriver implements KeyDeriverApi {
2071
+ rootKey: PrivateKey;
2072
+ identityKey: string;
2073
+ constructor(rootKey: PrivateKey | "anyone", options?: {
2074
+ maxCacheSize?: number;
2075
+ })
2076
+ derivePublicKey(protocolID: WalletProtocol, keyID: string, counterparty: Counterparty, forSelf: boolean = false): PublicKey
2077
+ derivePrivateKey(protocolID: WalletProtocol, keyID: string, counterparty: Counterparty): PrivateKey
2078
+ deriveSymmetricKey(protocolID: WalletProtocol, keyID: string, counterparty: Counterparty): SymmetricKey
2079
+ revealCounterpartySecret(counterparty: Counterparty): number[]
2080
+ revealSpecificSecret(counterparty: Counterparty, protocolID: WalletProtocol, keyID: string): number[]
2081
+ }
2082
+ ```
2083
+
2084
+ See also: [Counterparty](./wallet.md#type-counterparty), [KeyDeriverApi](./wallet.md#interface-keyderiverapi), [PrivateKey](./primitives.md#class-privatekey), [PublicKey](./primitives.md#class-publickey), [SymmetricKey](./primitives.md#class-symmetrickey), [WalletProtocol](./wallet.md#type-walletprotocol)
2085
+
2086
+ #### Constructor
2087
+
2088
+ Initializes the CachedKeyDeriver instance with a root private key and optional cache settings.
2089
+
2090
+ ```ts
2091
+ constructor(rootKey: PrivateKey | "anyone", options?: {
2092
+ maxCacheSize?: number;
2093
+ })
2094
+ ```
2095
+ See also: [PrivateKey](./primitives.md#class-privatekey)
2096
+
2097
+ Argument Details
2098
+
2099
+ + **rootKey**
2100
+ + The root private key or the string 'anyone'.
2101
+ + **options**
2102
+ + Optional settings for the cache.
2103
+
2104
+ #### Property identityKey
2105
+
2106
+ The identity of this key deriver which is normally the public key associated with the `rootKey`
2107
+
2108
+ ```ts
2109
+ identityKey: string
2110
+ ```
2111
+
2112
+ #### Property rootKey
2113
+
2114
+ The root key from which all other keys are derived.
2115
+
2116
+ ```ts
2117
+ rootKey: PrivateKey
2118
+ ```
2119
+ See also: [PrivateKey](./primitives.md#class-privatekey)
2120
+
2121
+ #### Method derivePrivateKey
2122
+
2123
+ Derives a private key based on protocol ID, key ID, and counterparty.
2124
+ Caches the result for future calls with the same parameters.
2125
+
2126
+ ```ts
2127
+ derivePrivateKey(protocolID: WalletProtocol, keyID: string, counterparty: Counterparty): PrivateKey
2128
+ ```
2129
+ See also: [Counterparty](./wallet.md#type-counterparty), [PrivateKey](./primitives.md#class-privatekey), [WalletProtocol](./wallet.md#type-walletprotocol)
2130
+
2131
+ Returns
2132
+
2133
+ - The derived private key.
2134
+
2135
+ Argument Details
2136
+
2137
+ + **protocolID**
2138
+ + The protocol ID including a security level and protocol name.
2139
+ + **keyID**
2140
+ + The key identifier.
2141
+ + **counterparty**
2142
+ + The counterparty's public key or a predefined value ('self' or 'anyone').
2143
+
2144
+ #### Method derivePublicKey
2145
+
2146
+ Derives a public key based on protocol ID, key ID, and counterparty.
2147
+ Caches the result for future calls with the same parameters.
2148
+
2149
+ ```ts
2150
+ derivePublicKey(protocolID: WalletProtocol, keyID: string, counterparty: Counterparty, forSelf: boolean = false): PublicKey
2151
+ ```
2152
+ See also: [Counterparty](./wallet.md#type-counterparty), [PublicKey](./primitives.md#class-publickey), [WalletProtocol](./wallet.md#type-walletprotocol)
2153
+
2154
+ Returns
2155
+
2156
+ - The derived public key.
2157
+
2158
+ Argument Details
2159
+
2160
+ + **protocolID**
1643
2161
  + The protocol ID including a security level and protocol name.
1644
2162
  + **keyID**
1645
2163
  + The key identifier.
@@ -2590,6 +3108,54 @@ See also: [BEEF](./wallet.md#type-beef), [Base64String](./wallet.md#type-base64s
2590
3108
 
2591
3109
  Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
2592
3110
 
3111
+ ---
3112
+ ### Class: WERR_INSUFFICIENT_FUNDS
3113
+
3114
+ Insufficient funds in the available inputs to cover the cost of the required outputs
3115
+ and the transaction fee (${moreSatoshisNeeded} more satoshis are needed,
3116
+ for a total of ${totalSatoshisNeeded}), plus whatever would be required in order
3117
+ to pay the fee to unlock and spend the outputs used to provide the additional satoshis.
3118
+
3119
+ ```ts
3120
+ export class WERR_INSUFFICIENT_FUNDS extends Error {
3121
+ code: number;
3122
+ isError: boolean = true;
3123
+ constructor(public totalSatoshisNeeded: number, public moreSatoshisNeeded: number)
3124
+ }
3125
+ ```
3126
+
3127
+ #### Constructor
3128
+
3129
+ ```ts
3130
+ constructor(public totalSatoshisNeeded: number, public moreSatoshisNeeded: number)
3131
+ ```
3132
+
3133
+ Argument Details
3134
+
3135
+ + **totalSatoshisNeeded**
3136
+ + Total satoshis required to fund transactions after net of required inputs and outputs.
3137
+ + **moreSatoshisNeeded**
3138
+ + Shortfall on total satoshis required to fund transactions after net of required inputs and outputs.
3139
+
3140
+ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
3141
+
3142
+ ---
3143
+ ### Class: WERR_INVALID_PARAMETER
3144
+
3145
+ The ${parameter} parameter is invalid.
3146
+
3147
+ This is an example of an error object with a custom property `parameter` and templated `message`.
3148
+
3149
+ ```ts
3150
+ export class WERR_INVALID_PARAMETER extends Error {
3151
+ code: number;
3152
+ isError: boolean = true;
3153
+ constructor(public parameter: string, mustBe?: string)
3154
+ }
3155
+ ```
3156
+
3157
+ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
3158
+
2593
3159
  ---
2594
3160
  ### Class: WERR_REVIEW_ACTIONS
2595
3161
 
@@ -2842,9 +3408,26 @@ export class WalletError extends Error {
2842
3408
  code: number;
2843
3409
  isError: boolean = true;
2844
3410
  constructor(message: string, code = 1, stack?: string)
3411
+ static unknownToJson(error: any): string
2845
3412
  }
2846
3413
  ```
2847
3414
 
3415
+ #### Method unknownToJson
3416
+
3417
+ Safely serializes a WalletError (including special cases), Error or unknown error to JSON.
3418
+
3419
+ Safely means avoiding deep, large, circular issues.
3420
+
3421
+ Example deserialization can be found in HTTPWalletJSON.ts of bsv ts-sdk.
3422
+
3423
+ ```ts
3424
+ static unknownToJson(error: any): string
3425
+ ```
3426
+
3427
+ Returns
3428
+
3429
+ stringified JSON representation of the error such that it can be deserialized to a WalletError.
3430
+
2848
3431
  Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
2849
3432
 
2850
3433
  ---
@@ -3970,19 +4553,822 @@ export default class XDMSubstrate implements WalletInterface {
3970
4553
  }
3971
4554
  ```
3972
4555
 
3973
- See also: [BEEF](./wallet.md#type-beef), [Base64String](./wallet.md#type-base64string), [BasketStringUnder300Bytes](./wallet.md#type-basketstringunder300bytes), [BooleanDefaultFalse](./wallet.md#type-booleandefaultfalse), [BooleanDefaultTrue](./wallet.md#type-booleandefaulttrue), [Byte](./wallet.md#type-byte), [CallType](./wallet.md#type-calltype), [CertificateFieldNameUnder50Bytes](./wallet.md#type-certificatefieldnameunder50bytes), [DescriptionString5to50Bytes](./wallet.md#type-descriptionstring5to50bytes), [EntityIconURLStringMax500Bytes](./wallet.md#type-entityiconurlstringmax500bytes), [EntityNameStringMax100Bytes](./wallet.md#type-entitynamestringmax100bytes), [HexString](./wallet.md#type-hexstring), [ISOTimestampString](./wallet.md#type-isotimestampstring), [KeyIDStringUnder800Bytes](./wallet.md#type-keyidstringunder800bytes), [LabelStringUnder300Bytes](./wallet.md#type-labelstringunder300bytes), [OutpointString](./wallet.md#type-outpointstring), [OutputTagStringUnder300Bytes](./wallet.md#type-outputtagstringunder300bytes), [PositiveInteger](./wallet.md#type-positiveinteger), [PositiveIntegerDefault10Max10000](./wallet.md#type-positiveintegerdefault10max10000), [PositiveIntegerMax10](./wallet.md#type-positiveintegermax10), [PositiveIntegerOrZero](./wallet.md#type-positiveintegerorzero), [ProtocolString5To400Bytes](./wallet.md#type-protocolstring5to400bytes), [PubKeyHex](./wallet.md#type-pubkeyhex), [SatoshiValue](./wallet.md#type-satoshivalue), [SecurityLevel](./wallet.md#type-securitylevel), [TXIDHexString](./wallet.md#type-txidhexstring), [VersionString7To30Bytes](./wallet.md#type-versionstring7to30bytes), [WalletInterface](./wallet.md#interface-walletinterface), [decrypt](./messages.md#variable-decrypt), [encrypt](./messages.md#variable-encrypt)
4556
+ See also: [BEEF](./wallet.md#type-beef), [Base64String](./wallet.md#type-base64string), [BasketStringUnder300Bytes](./wallet.md#type-basketstringunder300bytes), [BooleanDefaultFalse](./wallet.md#type-booleandefaultfalse), [BooleanDefaultTrue](./wallet.md#type-booleandefaulttrue), [Byte](./wallet.md#type-byte), [CallType](./wallet.md#type-calltype), [CertificateFieldNameUnder50Bytes](./wallet.md#type-certificatefieldnameunder50bytes), [DescriptionString5to50Bytes](./wallet.md#type-descriptionstring5to50bytes), [EntityIconURLStringMax500Bytes](./wallet.md#type-entityiconurlstringmax500bytes), [EntityNameStringMax100Bytes](./wallet.md#type-entitynamestringmax100bytes), [HexString](./wallet.md#type-hexstring), [ISOTimestampString](./wallet.md#type-isotimestampstring), [KeyIDStringUnder800Bytes](./wallet.md#type-keyidstringunder800bytes), [LabelStringUnder300Bytes](./wallet.md#type-labelstringunder300bytes), [OutpointString](./wallet.md#type-outpointstring), [OutputTagStringUnder300Bytes](./wallet.md#type-outputtagstringunder300bytes), [PositiveInteger](./wallet.md#type-positiveinteger), [PositiveIntegerDefault10Max10000](./wallet.md#type-positiveintegerdefault10max10000), [PositiveIntegerMax10](./wallet.md#type-positiveintegermax10), [PositiveIntegerOrZero](./wallet.md#type-positiveintegerorzero), [ProtocolString5To400Bytes](./wallet.md#type-protocolstring5to400bytes), [PubKeyHex](./wallet.md#type-pubkeyhex), [SatoshiValue](./wallet.md#type-satoshivalue), [SecurityLevel](./wallet.md#type-securitylevel), [TXIDHexString](./wallet.md#type-txidhexstring), [VersionString7To30Bytes](./wallet.md#type-versionstring7to30bytes), [WalletInterface](./wallet.md#interface-walletinterface), [decrypt](./messages.md#variable-decrypt), [encrypt](./messages.md#variable-encrypt)
4557
+
4558
+ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
4559
+
4560
+ ---
4561
+ ## Functions
4562
+
4563
+ | | | |
4564
+ | --- | --- | --- |
4565
+ | [isHexString](#function-ishexstring) | [validateCreateActionOutput](#function-validatecreateactionoutput) | [validateOriginator](#function-validateoriginator) |
4566
+ | [parseWalletOutpoint](#function-parsewalletoutpoint) | [validateDiscoverByAttributesArgs](#function-validatediscoverbyattributesargs) | [validateOutpointString](#function-validateoutpointstring) |
4567
+ | [toOriginHeader](#function-tooriginheader) | [validateDiscoverByIdentityKeyArgs](#function-validatediscoverbyidentitykeyargs) | [validatePositiveIntegerOrZero](#function-validatepositiveintegerorzero) |
4568
+ | [validateAbortActionArgs](#function-validateabortactionargs) | [validateInteger](#function-validateinteger) | [validateProveCertificateArgs](#function-validateprovecertificateargs) |
4569
+ | [validateAcquireDirectCertificateArgs](#function-validateacquiredirectcertificateargs) | [validateInternalizeActionArgs](#function-validateinternalizeactionargs) | [validateRelinquishCertificateArgs](#function-validaterelinquishcertificateargs) |
4570
+ | [validateAcquireIssuanceCertificateArgs](#function-validateacquireissuancecertificateargs) | [validateInternalizeOutput](#function-validateinternalizeoutput) | [validateRelinquishOutputArgs](#function-validaterelinquishoutputargs) |
4571
+ | [validateBase64String](#function-validatebase64string) | [validateListActionsArgs](#function-validatelistactionsargs) | [validateSatoshis](#function-validatesatoshis) |
4572
+ | [validateBasketInsertion](#function-validatebasketinsertion) | [validateListCertificatesArgs](#function-validatelistcertificatesargs) | [validateSignActionArgs](#function-validatesignactionargs) |
4573
+ | [validateCreateActionArgs](#function-validatecreateactionargs) | [validateListOutputsArgs](#function-validatelistoutputsargs) | [validateSignActionOptions](#function-validatesignactionoptions) |
4574
+ | [validateCreateActionInput](#function-validatecreateactioninput) | [validateOptionalInteger](#function-validateoptionalinteger) | [validateStringLength](#function-validatestringlength) |
4575
+ | [validateCreateActionOptions](#function-validatecreateactionoptions) | [validateOptionalOutpointString](#function-validateoptionaloutpointstring) | [validateWalletPayment](#function-validatewalletpayment) |
4576
+
4577
+ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
4578
+
4579
+ ---
4580
+
4581
+ ### Function: isHexString
4582
+
4583
+ Check whether a string is a valid hex string (even length and hex characters).
4584
+
4585
+ ```ts
4586
+ export function isHexString(s: string): boolean
4587
+ ```
4588
+
4589
+ Returns
4590
+
4591
+ true when s is a valid hex string
4592
+
4593
+ Argument Details
4594
+
4595
+ + **s**
4596
+ + input string
4597
+
4598
+ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
4599
+
4600
+ ---
4601
+ ### Function: parseWalletOutpoint
4602
+
4603
+ ```ts
4604
+ export function parseWalletOutpoint(outpoint: string): {
4605
+ txid: string;
4606
+ vout: number;
4607
+ }
4608
+ ```
4609
+
4610
+ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
4611
+
4612
+ ---
4613
+ ### Function: toOriginHeader
4614
+
4615
+ ```ts
4616
+ export function toOriginHeader(originator: string, fallbackScheme = "http"): string | undefined
4617
+ ```
4618
+
4619
+ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
4620
+
4621
+ ---
4622
+ ### Function: validateAbortActionArgs
4623
+
4624
+ Validate AbortActionArgs (ensures reference is a valid base64 string).
4625
+
4626
+ ```ts
4627
+ export function validateAbortActionArgs(args: AbortActionArgs): ValidAbortActionArgs
4628
+ ```
4629
+
4630
+ See also: [AbortActionArgs](./wallet.md#interface-abortactionargs), [ValidAbortActionArgs](./wallet.md#interface-validabortactionargs)
4631
+
4632
+ Returns
4633
+
4634
+ ValidAbortActionArgs
4635
+
4636
+ Argument Details
4637
+
4638
+ + **args**
4639
+ + AbortActionArgs
4640
+
4641
+ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
4642
+
4643
+ ---
4644
+ ### Function: validateAcquireDirectCertificateArgs
4645
+
4646
+ Validate direct-acquisition-specific acquire certificate args.
4647
+
4648
+ ```ts
4649
+ export function validateAcquireDirectCertificateArgs(args: AcquireCertificateArgs): ValidAcquireDirectCertificateArgs
4650
+ ```
4651
+
4652
+ See also: [AcquireCertificateArgs](./wallet.md#interface-acquirecertificateargs), [ValidAcquireDirectCertificateArgs](./wallet.md#interface-validacquiredirectcertificateargs)
4653
+
4654
+ Returns
4655
+
4656
+ ValidAcquireDirectCertificateArgs
4657
+
4658
+ Argument Details
4659
+
4660
+ + **args**
4661
+ + AcquireCertificateArgs with acquisitionProtocol === 'direct'
4662
+
4663
+ Throws
4664
+
4665
+ when args contain fields invalid for direct acquisition
4666
+
4667
+ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
4668
+
4669
+ ---
4670
+ ### Function: validateAcquireIssuanceCertificateArgs
4671
+
4672
+ Validate issuance-specific acquire certificate args.
4673
+
4674
+ ```ts
4675
+ export function validateAcquireIssuanceCertificateArgs(args: AcquireCertificateArgs): ValidAcquireIssuanceCertificateArgs
4676
+ ```
4677
+
4678
+ See also: [AcquireCertificateArgs](./wallet.md#interface-acquirecertificateargs), [ValidAcquireIssuanceCertificateArgs](./wallet.md#interface-validacquireissuancecertificateargs)
4679
+
4680
+ Returns
4681
+
4682
+ ValidAcquireIssuanceCertificateArgs
4683
+
4684
+ Argument Details
4685
+
4686
+ + **args**
4687
+ + AcquireCertificateArgs with acquisitionProtocol === 'issuance'
4688
+
4689
+ Throws
4690
+
4691
+ when args contain fields invalid for issuance
4692
+
4693
+ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
4694
+
4695
+ ---
4696
+ ### Function: validateBase64String
4697
+
4698
+ Validate a Base64 string (structure and decoded size).
4699
+
4700
+ ```ts
4701
+ export function validateBase64String(s: string, name: string, min?: number, max?: number): string
4702
+ ```
4703
+
4704
+ Returns
4705
+
4706
+ validated base64 string
4707
+
4708
+ Argument Details
4709
+
4710
+ + **s**
4711
+ + base64 string
4712
+ + **name**
4713
+ + parameter name used in error messages
4714
+ + **min**
4715
+ + optional minimum decoded byte length
4716
+ + **max**
4717
+ + optional maximum decoded byte length
4718
+
4719
+ Throws
4720
+
4721
+ WERR_INVALID_PARAMETER when invalid
4722
+
4723
+ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
4724
+
4725
+ ---
4726
+ ### Function: validateBasketInsertion
4727
+
4728
+ Validate a BasketInsertion structure (basket, custom instructions, tags).
4729
+
4730
+ ```ts
4731
+ export function validateBasketInsertion(args?: BasketInsertion): ValidBasketInsertion | undefined
4732
+ ```
4733
+
4734
+ See also: [BasketInsertion](./wallet.md#interface-basketinsertion), [ValidBasketInsertion](./wallet.md#interface-validbasketinsertion)
4735
+
4736
+ Returns
4737
+
4738
+ ValidBasketInsertion or undefined
4739
+
4740
+ Argument Details
4741
+
4742
+ + **args**
4743
+ + BasketInsertion or undefined
4744
+
4745
+ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
4746
+
4747
+ ---
4748
+ ### Function: validateCreateActionArgs
4749
+
4750
+ Validate the arguments for creating a new action.
4751
+
4752
+ ```ts
4753
+ export function validateCreateActionArgs(args: CreateActionArgs): ValidCreateActionArgs
4754
+ ```
4755
+
4756
+ See also: [CreateActionArgs](./wallet.md#interface-createactionargs), [ValidCreateActionArgs](./wallet.md#interface-validcreateactionargs)
4757
+
4758
+ Returns
4759
+
4760
+ validated arguments
4761
+
4762
+ Throws
4763
+
4764
+ primarily WERR_INVALID_PARAMETER if args are invalid.
4765
+
4766
+ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
4767
+
4768
+ ---
4769
+ ### Function: validateCreateActionInput
4770
+
4771
+ Validate a CreateActionInput structure.
4772
+
4773
+ Ensures either unlockingScript or unlockingScriptLength is provided and consistent,
4774
+ validates outpoint, description length, and sequence number.
4775
+
4776
+ ```ts
4777
+ export function validateCreateActionInput(i: CreateActionInput): ValidCreateActionInput
4778
+ ```
4779
+
4780
+ See also: [CreateActionInput](./wallet.md#interface-createactioninput), [ValidCreateActionInput](./wallet.md#interface-validcreateactioninput)
4781
+
4782
+ Returns
4783
+
4784
+ ValidCreateActionInput
4785
+
4786
+ Argument Details
4787
+
4788
+ + **i**
4789
+ + CreateActionInput to validate
4790
+
4791
+ Throws
4792
+
4793
+ WERR_INVALID_PARAMETER when invalid
4794
+
4795
+ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
4796
+
4797
+ ---
4798
+ ### Function: validateCreateActionOptions
4799
+
4800
+ Normalize and validate CreateActionOptions, applying defaults for booleans/numbers/arrays.
4801
+
4802
+ ```ts
4803
+ export function validateCreateActionOptions(options?: CreateActionOptions): ValidCreateActionOptions
4804
+ ```
4805
+
4806
+ See also: [CreateActionOptions](./wallet.md#interface-createactionoptions), [ValidCreateActionOptions](./wallet.md#interface-validcreateactionoptions)
4807
+
4808
+ Returns
4809
+
4810
+ ValidCreateActionOptions with defaults applied
4811
+
4812
+ Argument Details
4813
+
4814
+ + **options**
4815
+ + CreateActionOptions or undefined
4816
+
4817
+ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
4818
+
4819
+ ---
4820
+ ### Function: validateCreateActionOutput
4821
+
4822
+ Validate CreateActionOutput fields: locking script, satoshis, description, basket, tags.
4823
+
4824
+ ```ts
4825
+ export function validateCreateActionOutput(o: CreateActionOutput): ValidCreateActionOutput
4826
+ ```
4827
+
4828
+ See also: [CreateActionOutput](./wallet.md#interface-createactionoutput), [ValidCreateActionOutput](./wallet.md#interface-validcreateactionoutput)
4829
+
4830
+ Returns
4831
+
4832
+ ValidCreateActionOutput
4833
+
4834
+ Argument Details
4835
+
4836
+ + **o**
4837
+ + CreateActionOutput to validate
4838
+
4839
+ Throws
4840
+
4841
+ WERR_INVALID_PARAMETER when invalid
4842
+
4843
+ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
4844
+
4845
+ ---
4846
+ ### Function: validateDiscoverByAttributesArgs
4847
+
4848
+ Validate DiscoverByAttributesArgs: attributes, limit, offset, and permission flag.
4849
+
4850
+ ```ts
4851
+ export function validateDiscoverByAttributesArgs(args: DiscoverByAttributesArgs): ValidDiscoverByAttributesArgs
4852
+ ```
4853
+
4854
+ See also: [DiscoverByAttributesArgs](./wallet.md#interface-discoverbyattributesargs), [ValidDiscoverByAttributesArgs](./wallet.md#interface-validdiscoverbyattributesargs)
4855
+
4856
+ Returns
4857
+
4858
+ ValidDiscoverByAttributesArgs
4859
+
4860
+ Argument Details
4861
+
4862
+ + **args**
4863
+ + DiscoverByAttributesArgs
4864
+
4865
+ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
4866
+
4867
+ ---
4868
+ ### Function: validateDiscoverByIdentityKeyArgs
4869
+
4870
+ Validate DiscoverByIdentityKeyArgs, enforcing identity key length and defaults.
4871
+
4872
+ ```ts
4873
+ export function validateDiscoverByIdentityKeyArgs(args: DiscoverByIdentityKeyArgs): ValidDiscoverByIdentityKeyArgs
4874
+ ```
4875
+
4876
+ See also: [DiscoverByIdentityKeyArgs](./wallet.md#interface-discoverbyidentitykeyargs), [ValidDiscoverByIdentityKeyArgs](./wallet.md#interface-validdiscoverbyidentitykeyargs)
4877
+
4878
+ Returns
4879
+
4880
+ ValidDiscoverByIdentityKeyArgs
4881
+
4882
+ Argument Details
4883
+
4884
+ + **args**
4885
+ + DiscoverByIdentityKeyArgs
4886
+
4887
+ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
4888
+
4889
+ ---
4890
+ ### Function: validateInteger
4891
+
4892
+ Validate an integer, applying an optional default.
4893
+
4894
+ ```ts
4895
+ export function validateInteger(v: number | undefined, name: string, defaultValue?: number, min?: number, max?: number): number
4896
+ ```
4897
+
4898
+ Returns
4899
+
4900
+ validated integer
4901
+
4902
+ Argument Details
4903
+
4904
+ + **v**
4905
+ + value to validate (may be undefined)
4906
+ + **name**
4907
+ + parameter name used in error messages
4908
+ + **defaultValue**
4909
+ + value to return when v is undefined
4910
+ + **min**
4911
+ + optional minimum allowed value
4912
+ + **max**
4913
+ + optional maximum allowed value
4914
+
4915
+ Throws
4916
+
4917
+ WERR_INVALID_PARAMETER when invalid
4918
+
4919
+ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
4920
+
4921
+ ---
4922
+ ### Function: validateInternalizeActionArgs
4923
+
4924
+ Validate InternalizeActionArgs: tx, outputs, description, labels, permission flag.
4925
+
4926
+ ```ts
4927
+ export function validateInternalizeActionArgs(args: InternalizeActionArgs): ValidInternalizeActionArgs
4928
+ ```
4929
+
4930
+ See also: [InternalizeActionArgs](./wallet.md#interface-internalizeactionargs), [ValidInternalizeActionArgs](./wallet.md#interface-validinternalizeactionargs)
4931
+
4932
+ Returns
4933
+
4934
+ ValidInternalizeActionArgs
4935
+
4936
+ Argument Details
4937
+
4938
+ + **args**
4939
+ + InternalizeActionArgs to validate
4940
+
4941
+ Throws
4942
+
4943
+ WERR_INVALID_PARAMETER when invalid
4944
+
4945
+ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
4946
+
4947
+ ---
4948
+ ### Function: validateInternalizeOutput
4949
+
4950
+ Validate an InternalizeOutput entry.
4951
+
4952
+ ```ts
4953
+ export function validateInternalizeOutput(args: InternalizeOutput): ValidInternalizeOutput
4954
+ ```
4955
+
4956
+ See also: [InternalizeOutput](./wallet.md#interface-internalizeoutput), [ValidInternalizeOutput](./wallet.md#interface-validinternalizeoutput)
4957
+
4958
+ Returns
4959
+
4960
+ ValidInternalizeOutput
4961
+
4962
+ Argument Details
4963
+
4964
+ + **args**
4965
+ + InternalizeOutput to validate
3974
4966
 
3975
4967
  Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
3976
4968
 
3977
4969
  ---
3978
- ## Functions
4970
+ ### Function: validateListActionsArgs
3979
4971
 
3980
- ### Function: toOriginHeader
4972
+ ```ts
4973
+ export function validateListActionsArgs(args: ListActionsArgs): ValidListActionsArgs
4974
+ ```
4975
+
4976
+ See also: [ListActionsArgs](./wallet.md#interface-listactionsargs), [ValidListActionsArgs](./wallet.md#interface-validlistactionsargs)
4977
+
4978
+ Argument Details
4979
+
4980
+ + **args.labels**
4981
+ + An array of labels used to filter actions.
4982
+ + **args.labelQueryMode**
4983
+ + Optional. Specifies how to match labels (default is any which matches any of the labels).
4984
+ + **args.includeLabels**
4985
+ + Optional. Whether to include transaction labels in the result set.
4986
+ + **args.includeInputs**
4987
+ + Optional. Whether to include input details in the result set.
4988
+ + **args.includeInputSourceLockingScripts**
4989
+ + Optional. Whether to include input source locking scripts in the result set.
4990
+ + **args.includeInputUnlockingScripts**
4991
+ + Optional. Whether to include input unlocking scripts in the result set.
4992
+ + **args.includeOutputs**
4993
+ + Optional. Whether to include output details in the result set.
4994
+ + **args.includeOutputLockingScripts**
4995
+ + Optional. Whether to include output locking scripts in the result set.
4996
+ + **args.limit**
4997
+ + Optional. The maximum number of transactions to retrieve.
4998
+ + **args.offset**
4999
+ + Optional. Number of transactions to skip before starting to return the results.
5000
+ + **args.seekPermission**
5001
+ + — Optional. Whether to seek permission from the user for this operation if required. Default true, will return an error rather than proceed if set to false.
5002
+
5003
+ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
5004
+
5005
+ ---
5006
+ ### Function: validateListCertificatesArgs
5007
+
5008
+ Validate ListCertificatesArgs: certifiers, types, paging, and optional privileged reason.
3981
5009
 
3982
5010
  ```ts
3983
- export function toOriginHeader(originator: string, fallbackScheme = "http"): string | undefined
5011
+ export function validateListCertificatesArgs(args: ListCertificatesArgs): ValidListCertificatesArgs
5012
+ ```
5013
+
5014
+ See also: [ListCertificatesArgs](./wallet.md#interface-listcertificatesargs), [ValidListCertificatesArgs](./wallet.md#interface-validlistcertificatesargs)
5015
+
5016
+ Returns
5017
+
5018
+ ValidListCertificatesArgs
5019
+
5020
+ Argument Details
5021
+
5022
+ + **args**
5023
+ + ListCertificatesArgs
5024
+
5025
+ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
5026
+
5027
+ ---
5028
+ ### Function: validateListOutputsArgs
5029
+
5030
+ ```ts
5031
+ export function validateListOutputsArgs(args: ListOutputsArgs): ValidListOutputsArgs
5032
+ ```
5033
+
5034
+ See also: [ListOutputsArgs](./wallet.md#interface-listoutputsargs), [ValidListOutputsArgs](./wallet.md#interface-validlistoutputsargs)
5035
+
5036
+ Argument Details
5037
+
5038
+ + **args.basket**
5039
+ + Required. The associated basket name whose outputs should be listed.
5040
+ + **args.tags**
5041
+ + Optional. Filter outputs based on these tags.
5042
+ + **args.tagQueryMode**
5043
+ + Optional. Filter mode, defining whether all or any of the tags must match. By default, any tag can match.
5044
+ + **args.include**
5045
+ + Optional. Whether to include locking scripts (with each output) or entire transactions (as aggregated BEEF, at the top level) in the result. By default, unless specified, neither are returned.
5046
+ + **args.includeEntireTransactions**
5047
+ + Optional. Whether to include the entire transaction(s) in the result.
5048
+ + **args.includeCustomInstructions**
5049
+ + Optional. Whether custom instructions should be returned in the result.
5050
+ + **args.includeTags**
5051
+ + Optional. Whether the tags associated with the output should be returned.
5052
+ + **args.includeLabels**
5053
+ + Optional. Whether the labels associated with the transaction containing the output should be returned.
5054
+ + **args.limit**
5055
+ + Optional limit on the number of outputs to return.
5056
+ + **args.offset**
5057
+ + If positive or zero: Number of outputs to skip before starting to return results, oldest first.
5058
+ If negative: Outputs are returned newest first and offset of -1 is the newest output.
5059
+ When using negative offsets, caution is required as new outputs may be added between calls,
5060
+ potentially causing outputs to be duplicated across calls.
5061
+ + **args.seekPermission**
5062
+ + — Optional. Whether to seek permission from the user for this operation if required. Default true, will return an error rather than proceed if set to false.
5063
+
5064
+ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
5065
+
5066
+ ---
5067
+ ### Function: validateOptionalInteger
5068
+
5069
+ Validate an optional integer. Returns undefined or the validated integer.
5070
+
5071
+ ```ts
5072
+ export function validateOptionalInteger(v: number | undefined, name: string, min?: number, max?: number): number | undefined
5073
+ ```
5074
+
5075
+ Returns
5076
+
5077
+ validated integer or undefined
5078
+
5079
+ Argument Details
5080
+
5081
+ + **v**
5082
+ + value to validate (may be undefined)
5083
+ + **name**
5084
+ + parameter name used in error messages
5085
+ + **min**
5086
+ + optional minimum value
5087
+ + **max**
5088
+ + optional maximum value
5089
+
5090
+ Throws
5091
+
5092
+ WERR_INVALID_PARAMETER when invalid
5093
+
5094
+ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
5095
+
5096
+ ---
5097
+ ### Function: validateOptionalOutpointString
5098
+
5099
+ Validate an optional outpoint string (txid.vout).
5100
+
5101
+ ```ts
5102
+ export function validateOptionalOutpointString(outpoint: string | undefined, name: string): string | undefined
5103
+ ```
5104
+
5105
+ Returns
5106
+
5107
+ validated outpoint string or undefined
5108
+
5109
+ Argument Details
5110
+
5111
+ + **outpoint**
5112
+ + outpoint string or undefined
5113
+ + **name**
5114
+ + parameter name used in error messages
5115
+
5116
+ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
5117
+
5118
+ ---
5119
+ ### Function: validateOriginator
5120
+
5121
+ Validate originator string (trim/lowercase and part length checks).
5122
+
5123
+ ```ts
5124
+ export function validateOriginator(s?: string): string | undefined
5125
+ ```
5126
+
5127
+ Returns
5128
+
5129
+ normalized originator or undefined
5130
+
5131
+ Argument Details
5132
+
5133
+ + **s**
5134
+ + originator string or undefined
5135
+
5136
+ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
5137
+
5138
+ ---
5139
+ ### Function: validateOutpointString
5140
+
5141
+ Validate an outpoint string of the form txid.vout.
5142
+
5143
+ ```ts
5144
+ export function validateOutpointString(outpoint: string, name: string): string
5145
+ ```
5146
+
5147
+ Returns
5148
+
5149
+ normalized outpoint string (validated txid and vout)
5150
+
5151
+ Argument Details
5152
+
5153
+ + **outpoint**
5154
+ + outpoint string
5155
+ + **name**
5156
+ + parameter name used in error messages
5157
+
5158
+ Throws
5159
+
5160
+ WERR_INVALID_PARAMETER when invalid
5161
+
5162
+ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
5163
+
5164
+ ---
5165
+ ### Function: validatePositiveIntegerOrZero
5166
+
5167
+ Validate a non-negative integer (zero allowed).
5168
+
5169
+ ```ts
5170
+ export function validatePositiveIntegerOrZero(v: number, name: string): number
5171
+ ```
5172
+
5173
+ Returns
5174
+
5175
+ validated integer
5176
+
5177
+ Argument Details
5178
+
5179
+ + **v**
5180
+ + value to validate
5181
+ + **name**
5182
+ + parameter name used in error messages
5183
+
5184
+ Throws
5185
+
5186
+ WERR_INVALID_PARAMETER when invalid
5187
+
5188
+ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
5189
+
5190
+ ---
5191
+ ### Function: validateProveCertificateArgs
5192
+
5193
+ Validate ProveCertificateArgs including optional certificate fields and reveal list.
5194
+
5195
+ ```ts
5196
+ export function validateProveCertificateArgs(args: ProveCertificateArgs): ValidProveCertificateArgs
5197
+ ```
5198
+
5199
+ See also: [ProveCertificateArgs](./wallet.md#interface-provecertificateargs), [ValidProveCertificateArgs](./wallet.md#interface-validprovecertificateargs)
5200
+
5201
+ Returns
5202
+
5203
+ ValidProveCertificateArgs
5204
+
5205
+ Argument Details
5206
+
5207
+ + **args**
5208
+ + ProveCertificateArgs
5209
+
5210
+ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
5211
+
5212
+ ---
5213
+ ### Function: validateRelinquishCertificateArgs
5214
+
5215
+ Validate RelinquishCertificateArgs (type, serialNumber, certifier).
5216
+
5217
+ ```ts
5218
+ export function validateRelinquishCertificateArgs(args: RelinquishCertificateArgs): ValidRelinquishCertificateArgs
5219
+ ```
5220
+
5221
+ See also: [RelinquishCertificateArgs](./wallet.md#interface-relinquishcertificateargs), [ValidRelinquishCertificateArgs](./wallet.md#interface-validrelinquishcertificateargs)
5222
+
5223
+ Returns
5224
+
5225
+ ValidRelinquishCertificateArgs
5226
+
5227
+ Argument Details
5228
+
5229
+ + **args**
5230
+ + RelinquishCertificateArgs
5231
+
5232
+ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
5233
+
5234
+ ---
5235
+ ### Function: validateRelinquishOutputArgs
5236
+
5237
+ Validate RelinquishOutputArgs (basket and output).
5238
+
5239
+ ```ts
5240
+ export function validateRelinquishOutputArgs(args: RelinquishOutputArgs): ValidRelinquishOutputArgs
5241
+ ```
5242
+
5243
+ See also: [RelinquishOutputArgs](./wallet.md#interface-relinquishoutputargs), [ValidRelinquishOutputArgs](./wallet.md#interface-validrelinquishoutputargs)
5244
+
5245
+ Returns
5246
+
5247
+ ValidRelinquishOutputArgs
5248
+
5249
+ Argument Details
5250
+
5251
+ + **args**
5252
+ + RelinquishOutputArgs
5253
+
5254
+ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
5255
+
5256
+ ---
5257
+ ### Function: validateSatoshis
5258
+
5259
+ Validate a satoshi amount.
5260
+
5261
+ ```ts
5262
+ export function validateSatoshis(v: number | undefined, name: string, min?: number): number
5263
+ ```
5264
+
5265
+ Returns
5266
+
5267
+ validated satoshi number
5268
+
5269
+ Argument Details
5270
+
5271
+ + **v**
5272
+ + value to validate (integer number of satoshis)
5273
+ + **name**
5274
+ + parameter name used in error messages
5275
+ + **min**
5276
+ + optional minimum allowed satoshi value
5277
+
5278
+ Throws
5279
+
5280
+ WERR_INVALID_PARAMETER when invalid
5281
+
5282
+ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
5283
+
5284
+ ---
5285
+ ### Function: validateSignActionArgs
5286
+
5287
+ Validate SignActionArgs and apply defaults/flags.
5288
+
5289
+ ```ts
5290
+ export function validateSignActionArgs(args: SignActionArgs): ValidSignActionArgs
5291
+ ```
5292
+
5293
+ See also: [SignActionArgs](./wallet.md#interface-signactionargs), [ValidSignActionArgs](./wallet.md#interface-validsignactionargs)
5294
+
5295
+ Returns
5296
+
5297
+ ValidSignActionArgs
5298
+
5299
+ Argument Details
5300
+
5301
+ + **args**
5302
+ + SignActionArgs to validate
5303
+
5304
+ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
5305
+
5306
+ ---
5307
+ ### Function: validateSignActionOptions
5308
+
5309
+ Set all default true/false booleans to true or false if undefined.
5310
+ Set all possibly undefined numbers to their default values.
5311
+ Set all possibly undefined arrays to empty arrays.
5312
+ Convert string outpoints to `{ txid: string, vout: number }`
5313
+
5314
+ ```ts
5315
+ export function validateSignActionOptions(options?: SignActionOptions): ValidSignActionOptions
5316
+ ```
5317
+
5318
+ See also: [SignActionOptions](./wallet.md#interface-signactionoptions), [ValidSignActionOptions](./wallet.md#interface-validsignactionoptions)
5319
+
5320
+ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
5321
+
5322
+ ---
5323
+ ### Function: validateStringLength
5324
+
5325
+ Validate string length in bytes for UTF-8 encoded string.
5326
+
5327
+ ```ts
5328
+ export function validateStringLength(s: string, name: string, min?: number, max?: number): string
5329
+ ```
5330
+
5331
+ Returns
5332
+
5333
+ the original string when valid
5334
+
5335
+ Argument Details
5336
+
5337
+ + **s**
5338
+ + string to validate
5339
+ + **name**
5340
+ + parameter name used in error messages
5341
+ + **min**
5342
+ + optional minimum byte length
5343
+ + **max**
5344
+ + optional maximum byte length
5345
+
5346
+ Throws
5347
+
5348
+ WERR_INVALID_PARAMETER when invalid
5349
+
5350
+ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
5351
+
5352
+ ---
5353
+ ### Function: validateWalletPayment
5354
+
5355
+ Validate wallet payment remittance structure.
5356
+
5357
+ ```ts
5358
+ export function validateWalletPayment(args?: WalletPayment): ValidWalletPayment | undefined
3984
5359
  ```
3985
5360
 
5361
+ See also: [ValidWalletPayment](./wallet.md#interface-validwalletpayment), [WalletPayment](./wallet.md#interface-walletpayment)
5362
+
5363
+ Returns
5364
+
5365
+ ValidWalletPayment or undefined
5366
+
5367
+ Argument Details
5368
+
5369
+ + **args**
5370
+ + WalletPayment or undefined
5371
+
3986
5372
  Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
3987
5373
 
3988
5374
  ---
@@ -3990,21 +5376,21 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
3990
5376
 
3991
5377
  | | | |
3992
5378
  | --- | --- | --- |
3993
- | [AcquireCertificateResult](#type-acquirecertificateresult) | [EntityNameStringMax100Bytes](#type-entitynamestringmax100bytes) | [ProtocolString5To400Bytes](#type-protocolstring5to400bytes) |
3994
- | [AcquisitionProtocol](#type-acquisitionprotocol) | [ErrorCodeString10To40Bytes](#type-errorcodestring10to40bytes) | [PubKeyHex](#type-pubkeyhex) |
3995
- | [ActionStatus](#type-actionstatus) | [ErrorDescriptionString20To200Bytes](#type-errordescriptionstring20to200bytes) | [ReviewActionResultStatus](#type-reviewactionresultstatus) |
3996
- | [AtomicBEEF](#type-atomicbeef) | [HexString](#type-hexstring) | [SatoshiValue](#type-satoshivalue) |
3997
- | [BEEF](#type-beef) | [ISOTimestampString](#type-isotimestampstring) | [SecurityLevel](#type-securitylevel) |
3998
- | [Base64String](#type-base64string) | [KeyIDStringUnder800Bytes](#type-keyidstringunder800bytes) | [SendWithResultStatus](#type-sendwithresultstatus) |
3999
- | [BasketStringUnder300Bytes](#type-basketstringunder300bytes) | [KeyringRevealer](#type-keyringrevealer) | [TXIDHexString](#type-txidhexstring) |
4000
- | [BooleanDefaultFalse](#type-booleandefaultfalse) | [LabelStringUnder300Bytes](#type-labelstringunder300bytes) | [TrustSelf](#type-trustself) |
4001
- | [BooleanDefaultTrue](#type-booleandefaulttrue) | [OriginatorDomainNameStringUnder250Bytes](#type-originatordomainnamestringunder250bytes) | [VersionString7To30Bytes](#type-versionstring7to30bytes) |
4002
- | [Byte](#type-byte) | [OutpointString](#type-outpointstring) | [WalletCounterparty](#type-walletcounterparty) |
4003
- | [CallType](#type-calltype) | [OutputTagStringUnder300Bytes](#type-outputtagstringunder300bytes) | [WalletErrorCode](#type-walleterrorcode) |
4004
- | [CertificateFieldNameUnder50Bytes](#type-certificatefieldnameunder50bytes) | [PositiveInteger](#type-positiveinteger) | [WalletNetwork](#type-walletnetwork) |
4005
- | [Counterparty](#type-counterparty) | [PositiveIntegerDefault10Max10000](#type-positiveintegerdefault10max10000) | [WalletProtocol](#type-walletprotocol) |
5379
+ | [AcquireCertificateResult](#type-acquirecertificateresult) | [EntityIconURLStringMax500Bytes](#type-entityiconurlstringmax500bytes) | [PositiveIntegerOrZero](#type-positiveintegerorzero) |
5380
+ | [AcquisitionProtocol](#type-acquisitionprotocol) | [EntityNameStringMax100Bytes](#type-entitynamestringmax100bytes) | [ProtocolString5To400Bytes](#type-protocolstring5to400bytes) |
5381
+ | [ActionStatus](#type-actionstatus) | [ErrorCodeString10To40Bytes](#type-errorcodestring10to40bytes) | [PubKeyHex](#type-pubkeyhex) |
5382
+ | [AtomicBEEF](#type-atomicbeef) | [ErrorDescriptionString20To200Bytes](#type-errordescriptionstring20to200bytes) | [ReviewActionResultStatus](#type-reviewactionresultstatus) |
5383
+ | [BEEF](#type-beef) | [HexString](#type-hexstring) | [SatoshiValue](#type-satoshivalue) |
5384
+ | [Base64String](#type-base64string) | [ISOTimestampString](#type-isotimestampstring) | [SecurityLevel](#type-securitylevel) |
5385
+ | [BasketStringUnder300Bytes](#type-basketstringunder300bytes) | [KeyIDStringUnder800Bytes](#type-keyidstringunder800bytes) | [SendWithResultStatus](#type-sendwithresultstatus) |
5386
+ | [BooleanDefaultFalse](#type-booleandefaultfalse) | [KeyringRevealer](#type-keyringrevealer) | [TXIDHexString](#type-txidhexstring) |
5387
+ | [BooleanDefaultTrue](#type-booleandefaulttrue) | [LabelStringUnder300Bytes](#type-labelstringunder300bytes) | [TrustSelf](#type-trustself) |
5388
+ | [Byte](#type-byte) | [OriginatorDomainNameStringUnder250Bytes](#type-originatordomainnamestringunder250bytes) | [VersionString7To30Bytes](#type-versionstring7to30bytes) |
5389
+ | [CallType](#type-calltype) | [OutpointString](#type-outpointstring) | [WalletCounterparty](#type-walletcounterparty) |
5390
+ | [CertificateFieldNameUnder50Bytes](#type-certificatefieldnameunder50bytes) | [OutputTagStringUnder300Bytes](#type-outputtagstringunder300bytes) | [WalletErrorCode](#type-walleterrorcode) |
5391
+ | [Counterparty](#type-counterparty) | [PositiveInteger](#type-positiveinteger) | [WalletNetwork](#type-walletnetwork) |
5392
+ | [DescriptionString5to2000Bytes](#type-descriptionstring5to2000bytes) | [PositiveIntegerDefault10Max10000](#type-positiveintegerdefault10max10000) | [WalletProtocol](#type-walletprotocol) |
4006
5393
  | [DescriptionString5to50Bytes](#type-descriptionstring5to50bytes) | [PositiveIntegerMax10](#type-positiveintegermax10) | |
4007
- | [EntityIconURLStringMax500Bytes](#type-entityiconurlstringmax500bytes) | [PositiveIntegerOrZero](#type-positiveintegerorzero) | |
4008
5394
 
4009
5395
  Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
4010
5396
 
@@ -4134,6 +5520,17 @@ See also: [PubKeyHex](./wallet.md#type-pubkeyhex), [PublicKey](./primitives.md#c
4134
5520
 
4135
5521
  Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
4136
5522
 
5523
+ ---
5524
+ ### Type: DescriptionString5to2000Bytes
5525
+
5526
+ DescriptionString5to2000Bytes alias type (documented).
5527
+
5528
+ ```ts
5529
+ export type DescriptionString5to2000Bytes = string
5530
+ ```
5531
+
5532
+ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
5533
+
4137
5534
  ---
4138
5535
  ### Type: DescriptionString5to50Bytes
4139
5536
 
@@ -4474,7 +5871,9 @@ export enum walletErrors {
4474
5871
  unsupportedAction = 2,
4475
5872
  invalidHmac = 3,
4476
5873
  invalidSignature = 4,
4477
- reviewActions = 5
5874
+ reviewActions = 5,
5875
+ invalidParameter = 6,
5876
+ insufficientFunds = 7
4478
5877
  }
4479
5878
  ```
4480
5879
 
@@ -4483,3 +5882,12 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
4483
5882
  ---
4484
5883
  ## Variables
4485
5884
 
5885
+ ### Variable: specOpThrowReviewActions
5886
+
5887
+ ```ts
5888
+ specOpThrowReviewActions = "a496e747fc3ad5fabdd4ae8f91184e71f87539bd3d962aa2548942faaaf0047a"
5889
+ ```
5890
+
5891
+ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
5892
+
5893
+ ---