@bsv/sdk 1.8.9 → 1.8.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/package.json +1 -1
- package/dist/cjs/src/transaction/Beef.js +1 -0
- package/dist/cjs/src/transaction/Beef.js.map +1 -1
- package/dist/cjs/src/wallet/WERR_INSUFFICIENT_FUNDS.js +26 -0
- package/dist/cjs/src/wallet/WERR_INSUFFICIENT_FUNDS.js.map +1 -0
- package/dist/cjs/src/wallet/WERR_INVALID_PARAMETER.js +20 -0
- package/dist/cjs/src/wallet/WERR_INVALID_PARAMETER.js.map +1 -0
- package/dist/cjs/src/wallet/WalletClient.js +23 -0
- package/dist/cjs/src/wallet/WalletClient.js.map +1 -1
- package/dist/cjs/src/wallet/WalletError.js +55 -0
- package/dist/cjs/src/wallet/WalletError.js.map +1 -1
- package/dist/cjs/src/wallet/index.js +18 -1
- package/dist/cjs/src/wallet/index.js.map +1 -1
- package/dist/cjs/src/wallet/substrates/HTTPWalletJSON.js +28 -11
- package/dist/cjs/src/wallet/substrates/HTTPWalletJSON.js.map +1 -1
- package/dist/cjs/src/wallet/validationHelpers.js +920 -0
- package/dist/cjs/src/wallet/validationHelpers.js.map +1 -0
- package/dist/cjs/tsconfig.cjs.tsbuildinfo +1 -1
- package/dist/esm/src/transaction/Beef.js +1 -0
- package/dist/esm/src/transaction/Beef.js.map +1 -1
- package/dist/esm/src/wallet/WERR_INSUFFICIENT_FUNDS.js +25 -0
- package/dist/esm/src/wallet/WERR_INSUFFICIENT_FUNDS.js.map +1 -0
- package/dist/esm/src/wallet/WERR_INVALID_PARAMETER.js +18 -0
- package/dist/esm/src/wallet/WERR_INVALID_PARAMETER.js.map +1 -0
- package/dist/esm/src/wallet/WalletClient.js +23 -0
- package/dist/esm/src/wallet/WalletClient.js.map +1 -1
- package/dist/esm/src/wallet/WalletError.js +55 -0
- package/dist/esm/src/wallet/WalletError.js.map +1 -1
- package/dist/esm/src/wallet/index.js +3 -0
- package/dist/esm/src/wallet/index.js.map +1 -1
- package/dist/esm/src/wallet/substrates/HTTPWalletJSON.js +25 -11
- package/dist/esm/src/wallet/substrates/HTTPWalletJSON.js.map +1 -1
- package/dist/esm/src/wallet/validationHelpers.js +859 -0
- package/dist/esm/src/wallet/validationHelpers.js.map +1 -0
- package/dist/esm/tsconfig.esm.tsbuildinfo +1 -1
- package/dist/types/src/transaction/Beef.d.ts +1 -0
- package/dist/types/src/transaction/Beef.d.ts.map +1 -1
- package/dist/types/src/wallet/WERR_INSUFFICIENT_FUNDS.d.ts +19 -0
- package/dist/types/src/wallet/WERR_INSUFFICIENT_FUNDS.d.ts.map +1 -0
- package/dist/types/src/wallet/WERR_INVALID_PARAMETER.d.ts +13 -0
- package/dist/types/src/wallet/WERR_INVALID_PARAMETER.d.ts.map +1 -0
- package/dist/types/src/wallet/WalletClient.d.ts.map +1 -1
- package/dist/types/src/wallet/WalletError.d.ts +14 -1
- package/dist/types/src/wallet/WalletError.d.ts.map +1 -1
- package/dist/types/src/wallet/index.d.ts +3 -0
- package/dist/types/src/wallet/index.d.ts.map +1 -1
- package/dist/types/src/wallet/substrates/HTTPWalletJSON.d.ts.map +1 -1
- package/dist/types/src/wallet/validationHelpers.d.ts +512 -0
- package/dist/types/src/wallet/validationHelpers.d.ts.map +1 -0
- package/dist/types/tsconfig.types.tsbuildinfo +1 -1
- package/dist/umd/bundle.js +4 -4
- package/dist/umd/bundle.js.map +1 -1
- package/docs/reference/wallet.md +1431 -53
- package/package.json +1 -1
- package/src/transaction/Beef.ts +2 -0
- package/src/wallet/WERR_INSUFFICIENT_FUNDS.ts +25 -0
- package/src/wallet/WERR_INVALID_PARAMETER.ts +20 -0
- package/src/wallet/WalletClient.ts +30 -0
- package/src/wallet/WalletError.ts +52 -0
- package/src/wallet/__tests/WalletClient.test.ts +31 -0
- package/src/wallet/index.ts +3 -0
- package/src/wallet/substrates/HTTPWalletJSON.ts +19 -9
- package/src/wallet/validationHelpers.ts +1211 -0
package/docs/reference/wallet.md
CHANGED
|
@@ -6,31 +6,39 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
|
|
|
6
6
|
|
|
7
7
|
| | | |
|
|
8
8
|
| --- | --- | --- |
|
|
9
|
-
| [AbortActionArgs](#interface-abortactionargs) | [
|
|
10
|
-
| [AbortActionResult](#interface-abortactionresult) | [
|
|
11
|
-
| [AcquireCertificateArgs](#interface-acquirecertificateargs) | [
|
|
12
|
-
| [AuthenticatedResult](#interface-authenticatedresult) | [
|
|
13
|
-
| [BasketInsertion](#interface-basketinsertion) | [
|
|
14
|
-
| [CertificateResult](#interface-certificateresult) | [
|
|
15
|
-
| [CreateActionArgs](#interface-createactionargs) | [
|
|
16
|
-
| [CreateActionInput](#interface-createactioninput) | [
|
|
17
|
-
| [CreateActionOptions](#interface-createactionoptions) | [
|
|
18
|
-
| [CreateActionOutput](#interface-createactionoutput) | [
|
|
19
|
-
| [CreateActionResult](#interface-createactionresult) | [
|
|
20
|
-
| [CreateHmacArgs](#interface-createhmacargs) | [
|
|
21
|
-
| [CreateHmacResult](#interface-createhmacresult) | [
|
|
22
|
-
| [CreateSignatureArgs](#interface-createsignatureargs) | [
|
|
23
|
-
| [CreateSignatureResult](#interface-createsignatureresult) | [
|
|
24
|
-
| [DiscoverByAttributesArgs](#interface-discoverbyattributesargs) | [
|
|
25
|
-
| [DiscoverByIdentityKeyArgs](#interface-discoverbyidentitykeyargs) | [
|
|
26
|
-
| [DiscoverCertificatesResult](#interface-discovercertificatesresult) | [
|
|
27
|
-
| [GetHeaderArgs](#interface-getheaderargs) | [
|
|
28
|
-
| [GetHeaderResult](#interface-getheaderresult) | [
|
|
29
|
-
| [GetHeightResult](#interface-getheightresult) | [
|
|
30
|
-
| [GetNetworkResult](#interface-getnetworkresult) | [
|
|
31
|
-
| [GetPublicKeyArgs](#interface-getpublickeyargs) | [
|
|
32
|
-
| [GetPublicKeyResult](#interface-getpublickeyresult) | [
|
|
33
|
-
| [GetVersionResult](#interface-getversionresult) | [
|
|
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
|
|
|
@@ -957,6 +995,485 @@ See also: [AtomicBEEF](./wallet.md#type-atomicbeef), [Base64String](./wallet.md#
|
|
|
957
995
|
|
|
958
996
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
|
|
959
997
|
|
|
998
|
+
---
|
|
999
|
+
### Interface: ValidAbortActionArgs
|
|
1000
|
+
|
|
1001
|
+
```ts
|
|
1002
|
+
export interface ValidAbortActionArgs extends ValidWalletSignerArgs {
|
|
1003
|
+
reference: Base64String;
|
|
1004
|
+
}
|
|
1005
|
+
```
|
|
1006
|
+
|
|
1007
|
+
See also: [Base64String](./wallet.md#type-base64string), [ValidWalletSignerArgs](./wallet.md#interface-validwalletsignerargs)
|
|
1008
|
+
|
|
1009
|
+
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
|
|
1010
|
+
|
|
1011
|
+
---
|
|
1012
|
+
### Interface: ValidAcquireCertificateArgs
|
|
1013
|
+
|
|
1014
|
+
```ts
|
|
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;
|
|
1028
|
+
}
|
|
1029
|
+
```
|
|
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
|
+
|
|
1033
|
+
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
|
|
1034
|
+
|
|
1035
|
+
---
|
|
1036
|
+
### Interface: ValidAcquireDirectCertificateArgs
|
|
1037
|
+
|
|
1038
|
+
```ts
|
|
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;
|
|
1051
|
+
}
|
|
1052
|
+
```
|
|
1053
|
+
|
|
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)
|
|
1055
|
+
|
|
1056
|
+
#### Property subject
|
|
1057
|
+
|
|
1058
|
+
validated to an empty string, must be provided by wallet and must
|
|
1059
|
+
match expectations of keyringForSubject
|
|
1060
|
+
|
|
1061
|
+
```ts
|
|
1062
|
+
subject: PubKeyHex
|
|
1063
|
+
```
|
|
1064
|
+
See also: [PubKeyHex](./wallet.md#type-pubkeyhex)
|
|
1065
|
+
|
|
1066
|
+
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
|
|
1067
|
+
|
|
1068
|
+
---
|
|
1069
|
+
### Interface: ValidAcquireIssuanceCertificateArgs
|
|
1070
|
+
|
|
1071
|
+
```ts
|
|
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;
|
|
1080
|
+
}
|
|
1081
|
+
```
|
|
1082
|
+
|
|
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)
|
|
1084
|
+
|
|
1085
|
+
#### Property subject
|
|
1086
|
+
|
|
1087
|
+
validated to an empty string, must be provided by wallet and must
|
|
1088
|
+
match expectations of keyringForSubject
|
|
1089
|
+
|
|
1090
|
+
```ts
|
|
1091
|
+
subject: PubKeyHex
|
|
1092
|
+
```
|
|
1093
|
+
See also: [PubKeyHex](./wallet.md#type-pubkeyhex)
|
|
1094
|
+
|
|
1095
|
+
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
|
|
1096
|
+
|
|
1097
|
+
---
|
|
1098
|
+
### Interface: ValidBasketInsertion
|
|
1099
|
+
|
|
1100
|
+
```ts
|
|
1101
|
+
export interface ValidBasketInsertion {
|
|
1102
|
+
basket: BasketStringUnder300Bytes;
|
|
1103
|
+
customInstructions?: string;
|
|
1104
|
+
tags: BasketStringUnder300Bytes[];
|
|
1105
|
+
}
|
|
1106
|
+
```
|
|
1107
|
+
|
|
1108
|
+
See also: [BasketStringUnder300Bytes](./wallet.md#type-basketstringunder300bytes)
|
|
1109
|
+
|
|
1110
|
+
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
|
|
1111
|
+
|
|
1112
|
+
---
|
|
1113
|
+
### Interface: ValidCreateActionArgs
|
|
1114
|
+
|
|
1115
|
+
```ts
|
|
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;
|
|
1128
|
+
}
|
|
1129
|
+
```
|
|
1130
|
+
|
|
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
|
+
```
|
|
1142
|
+
|
|
1143
|
+
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
|
|
1144
|
+
|
|
1145
|
+
---
|
|
1146
|
+
### Interface: ValidCreateActionInput
|
|
1147
|
+
|
|
1148
|
+
```ts
|
|
1149
|
+
export interface ValidCreateActionInput {
|
|
1150
|
+
outpoint: OutPoint;
|
|
1151
|
+
inputDescription: DescriptionString5to2000Bytes;
|
|
1152
|
+
sequenceNumber: PositiveIntegerOrZero;
|
|
1153
|
+
unlockingScript?: HexString;
|
|
1154
|
+
unlockingScriptLength: PositiveInteger;
|
|
1155
|
+
}
|
|
1156
|
+
```
|
|
1157
|
+
|
|
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)
|
|
1159
|
+
|
|
1160
|
+
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
|
|
1161
|
+
|
|
1162
|
+
---
|
|
1163
|
+
### Interface: ValidCreateActionOptions
|
|
1164
|
+
|
|
1165
|
+
```ts
|
|
1166
|
+
export interface ValidCreateActionOptions extends ValidProcessActionOptions {
|
|
1167
|
+
signAndProcess: boolean;
|
|
1168
|
+
trustSelf?: TrustSelf;
|
|
1169
|
+
knownTxids: TXIDHexString[];
|
|
1170
|
+
noSendChange: OutPoint[];
|
|
1171
|
+
randomizeOutputs: boolean;
|
|
1172
|
+
}
|
|
1173
|
+
```
|
|
1174
|
+
|
|
1175
|
+
See also: [OutPoint](./wallet.md#interface-outpoint), [TXIDHexString](./wallet.md#type-txidhexstring), [TrustSelf](./wallet.md#type-trustself), [ValidProcessActionOptions](./wallet.md#interface-validprocessactionoptions)
|
|
1176
|
+
|
|
1177
|
+
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
|
|
1178
|
+
|
|
1179
|
+
---
|
|
1180
|
+
### Interface: ValidCreateActionOutput
|
|
1181
|
+
|
|
1182
|
+
```ts
|
|
1183
|
+
export interface ValidCreateActionOutput {
|
|
1184
|
+
lockingScript: HexString;
|
|
1185
|
+
satoshis: SatoshiValue;
|
|
1186
|
+
outputDescription: DescriptionString5to2000Bytes;
|
|
1187
|
+
basket?: BasketStringUnder300Bytes;
|
|
1188
|
+
customInstructions?: string;
|
|
1189
|
+
tags: BasketStringUnder300Bytes[];
|
|
1190
|
+
}
|
|
1191
|
+
```
|
|
1192
|
+
|
|
1193
|
+
See also: [BasketStringUnder300Bytes](./wallet.md#type-basketstringunder300bytes), [DescriptionString5to2000Bytes](./wallet.md#type-descriptionstring5to2000bytes), [HexString](./wallet.md#type-hexstring), [SatoshiValue](./wallet.md#type-satoshivalue)
|
|
1194
|
+
|
|
1195
|
+
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
|
|
1196
|
+
|
|
1197
|
+
---
|
|
1198
|
+
### Interface: ValidDiscoverByAttributesArgs
|
|
1199
|
+
|
|
1200
|
+
```ts
|
|
1201
|
+
export interface ValidDiscoverByAttributesArgs extends ValidWalletSignerArgs {
|
|
1202
|
+
attributes: Record<CertificateFieldNameUnder50Bytes, string>;
|
|
1203
|
+
limit: PositiveIntegerDefault10Max10000;
|
|
1204
|
+
offset: PositiveIntegerOrZero;
|
|
1205
|
+
seekPermission: boolean;
|
|
1206
|
+
}
|
|
1207
|
+
```
|
|
1208
|
+
|
|
1209
|
+
See also: [CertificateFieldNameUnder50Bytes](./wallet.md#type-certificatefieldnameunder50bytes), [PositiveIntegerDefault10Max10000](./wallet.md#type-positiveintegerdefault10max10000), [PositiveIntegerOrZero](./wallet.md#type-positiveintegerorzero), [ValidWalletSignerArgs](./wallet.md#interface-validwalletsignerargs)
|
|
1210
|
+
|
|
1211
|
+
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
|
|
1212
|
+
|
|
1213
|
+
---
|
|
1214
|
+
### Interface: ValidDiscoverByIdentityKeyArgs
|
|
1215
|
+
|
|
1216
|
+
```ts
|
|
1217
|
+
export interface ValidDiscoverByIdentityKeyArgs extends ValidWalletSignerArgs {
|
|
1218
|
+
identityKey: PubKeyHex;
|
|
1219
|
+
limit: PositiveIntegerDefault10Max10000;
|
|
1220
|
+
offset: PositiveIntegerOrZero;
|
|
1221
|
+
seekPermission: boolean;
|
|
1222
|
+
}
|
|
1223
|
+
```
|
|
1224
|
+
|
|
1225
|
+
See also: [PositiveIntegerDefault10Max10000](./wallet.md#type-positiveintegerdefault10max10000), [PositiveIntegerOrZero](./wallet.md#type-positiveintegerorzero), [PubKeyHex](./wallet.md#type-pubkeyhex), [ValidWalletSignerArgs](./wallet.md#interface-validwalletsignerargs)
|
|
1226
|
+
|
|
1227
|
+
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
|
|
1228
|
+
|
|
1229
|
+
---
|
|
1230
|
+
### Interface: ValidInternalizeActionArgs
|
|
1231
|
+
|
|
1232
|
+
```ts
|
|
1233
|
+
export interface ValidInternalizeActionArgs extends ValidWalletSignerArgs {
|
|
1234
|
+
tx: AtomicBEEF;
|
|
1235
|
+
outputs: InternalizeOutput[];
|
|
1236
|
+
description: DescriptionString5to2000Bytes;
|
|
1237
|
+
labels: LabelStringUnder300Bytes[];
|
|
1238
|
+
seekPermission: BooleanDefaultTrue;
|
|
1239
|
+
}
|
|
1240
|
+
```
|
|
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
|
+
|
|
1244
|
+
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
|
|
1245
|
+
|
|
1246
|
+
---
|
|
1247
|
+
### Interface: ValidInternalizeOutput
|
|
1248
|
+
|
|
1249
|
+
```ts
|
|
1250
|
+
export interface ValidInternalizeOutput {
|
|
1251
|
+
outputIndex: PositiveIntegerOrZero;
|
|
1252
|
+
protocol: "wallet payment" | "basket insertion";
|
|
1253
|
+
paymentRemittance?: ValidWalletPayment;
|
|
1254
|
+
insertionRemittance?: ValidBasketInsertion;
|
|
1255
|
+
}
|
|
1256
|
+
```
|
|
1257
|
+
|
|
1258
|
+
See also: [PositiveIntegerOrZero](./wallet.md#type-positiveintegerorzero), [ValidBasketInsertion](./wallet.md#interface-validbasketinsertion), [ValidWalletPayment](./wallet.md#interface-validwalletpayment)
|
|
1259
|
+
|
|
1260
|
+
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
|
|
1261
|
+
|
|
1262
|
+
---
|
|
1263
|
+
### Interface: ValidListActionsArgs
|
|
1264
|
+
|
|
1265
|
+
```ts
|
|
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;
|
|
1278
|
+
}
|
|
1279
|
+
```
|
|
1280
|
+
|
|
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)
|
|
1282
|
+
|
|
1283
|
+
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
|
|
1284
|
+
|
|
1285
|
+
---
|
|
1286
|
+
### Interface: ValidListCertificatesArgs
|
|
1287
|
+
|
|
1288
|
+
```ts
|
|
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
|
+
}
|
|
1305
|
+
```
|
|
1306
|
+
|
|
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)
|
|
1308
|
+
|
|
1309
|
+
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
|
|
1310
|
+
|
|
1311
|
+
---
|
|
1312
|
+
### Interface: ValidListOutputsArgs
|
|
1313
|
+
|
|
1314
|
+
```ts
|
|
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
|
+
}
|
|
1329
|
+
```
|
|
1330
|
+
|
|
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)
|
|
1332
|
+
|
|
1333
|
+
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
|
|
1334
|
+
|
|
1335
|
+
---
|
|
1336
|
+
### Interface: ValidProcessActionArgs
|
|
1337
|
+
|
|
1338
|
+
```ts
|
|
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
|
+
}
|
|
1348
|
+
```
|
|
1349
|
+
|
|
1350
|
+
See also: [ValidProcessActionOptions](./wallet.md#interface-validprocessactionoptions), [ValidWalletSignerArgs](./wallet.md#interface-validwalletsignerargs)
|
|
1351
|
+
|
|
1352
|
+
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
|
|
1353
|
+
|
|
1354
|
+
---
|
|
1355
|
+
### Interface: ValidProcessActionOptions
|
|
1356
|
+
|
|
1357
|
+
```ts
|
|
1358
|
+
export interface ValidProcessActionOptions {
|
|
1359
|
+
acceptDelayedBroadcast: BooleanDefaultTrue;
|
|
1360
|
+
returnTXIDOnly: BooleanDefaultFalse;
|
|
1361
|
+
noSend: BooleanDefaultFalse;
|
|
1362
|
+
sendWith: TXIDHexString[];
|
|
1363
|
+
}
|
|
1364
|
+
```
|
|
1365
|
+
|
|
1366
|
+
See also: [BooleanDefaultFalse](./wallet.md#type-booleandefaultfalse), [BooleanDefaultTrue](./wallet.md#type-booleandefaulttrue), [TXIDHexString](./wallet.md#type-txidhexstring)
|
|
1367
|
+
|
|
1368
|
+
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
|
|
1369
|
+
|
|
1370
|
+
---
|
|
1371
|
+
### Interface: ValidProveCertificateArgs
|
|
1372
|
+
|
|
1373
|
+
```ts
|
|
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
|
+
}
|
|
1386
|
+
```
|
|
1387
|
+
|
|
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)
|
|
1389
|
+
|
|
1390
|
+
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
|
|
1391
|
+
|
|
1392
|
+
---
|
|
1393
|
+
### Interface: ValidRelinquishCertificateArgs
|
|
1394
|
+
|
|
1395
|
+
```ts
|
|
1396
|
+
export interface ValidRelinquishCertificateArgs extends ValidWalletSignerArgs {
|
|
1397
|
+
type: Base64String;
|
|
1398
|
+
serialNumber: Base64String;
|
|
1399
|
+
certifier: PubKeyHex;
|
|
1400
|
+
}
|
|
1401
|
+
```
|
|
1402
|
+
|
|
1403
|
+
See also: [Base64String](./wallet.md#type-base64string), [PubKeyHex](./wallet.md#type-pubkeyhex), [ValidWalletSignerArgs](./wallet.md#interface-validwalletsignerargs)
|
|
1404
|
+
|
|
1405
|
+
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
|
|
1406
|
+
|
|
1407
|
+
---
|
|
1408
|
+
### Interface: ValidRelinquishOutputArgs
|
|
1409
|
+
|
|
1410
|
+
```ts
|
|
1411
|
+
export interface ValidRelinquishOutputArgs extends ValidWalletSignerArgs {
|
|
1412
|
+
basket: BasketStringUnder300Bytes;
|
|
1413
|
+
output: OutpointString;
|
|
1414
|
+
}
|
|
1415
|
+
```
|
|
1416
|
+
|
|
1417
|
+
See also: [BasketStringUnder300Bytes](./wallet.md#type-basketstringunder300bytes), [OutpointString](./wallet.md#type-outpointstring), [ValidWalletSignerArgs](./wallet.md#interface-validwalletsignerargs)
|
|
1418
|
+
|
|
1419
|
+
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
|
|
1420
|
+
|
|
1421
|
+
---
|
|
1422
|
+
### Interface: ValidSignActionArgs
|
|
1423
|
+
|
|
1424
|
+
```ts
|
|
1425
|
+
export interface ValidSignActionArgs extends ValidProcessActionArgs {
|
|
1426
|
+
spends: Record<PositiveIntegerOrZero, SignActionSpend>;
|
|
1427
|
+
reference: Base64String;
|
|
1428
|
+
options: ValidSignActionOptions;
|
|
1429
|
+
}
|
|
1430
|
+
```
|
|
1431
|
+
|
|
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)
|
|
1433
|
+
|
|
1434
|
+
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
|
|
1435
|
+
|
|
1436
|
+
---
|
|
1437
|
+
### Interface: ValidSignActionOptions
|
|
1438
|
+
|
|
1439
|
+
```ts
|
|
1440
|
+
export interface ValidSignActionOptions extends ValidProcessActionOptions {
|
|
1441
|
+
acceptDelayedBroadcast: boolean;
|
|
1442
|
+
returnTXIDOnly: boolean;
|
|
1443
|
+
noSend: boolean;
|
|
1444
|
+
sendWith: TXIDHexString[];
|
|
1445
|
+
}
|
|
1446
|
+
```
|
|
1447
|
+
|
|
1448
|
+
See also: [TXIDHexString](./wallet.md#type-txidhexstring), [ValidProcessActionOptions](./wallet.md#interface-validprocessactionoptions)
|
|
1449
|
+
|
|
1450
|
+
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
|
|
1451
|
+
|
|
1452
|
+
---
|
|
1453
|
+
### Interface: ValidWalletPayment
|
|
1454
|
+
|
|
1455
|
+
```ts
|
|
1456
|
+
export interface ValidWalletPayment {
|
|
1457
|
+
derivationPrefix: Base64String;
|
|
1458
|
+
derivationSuffix: Base64String;
|
|
1459
|
+
senderIdentityKey: PubKeyHex;
|
|
1460
|
+
}
|
|
1461
|
+
```
|
|
1462
|
+
|
|
1463
|
+
See also: [Base64String](./wallet.md#type-base64string), [PubKeyHex](./wallet.md#type-pubkeyhex)
|
|
1464
|
+
|
|
1465
|
+
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
|
|
1466
|
+
|
|
1467
|
+
---
|
|
1468
|
+
### Interface: ValidWalletSignerArgs
|
|
1469
|
+
|
|
1470
|
+
```ts
|
|
1471
|
+
export interface ValidWalletSignerArgs {
|
|
1472
|
+
}
|
|
1473
|
+
```
|
|
1474
|
+
|
|
1475
|
+
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
|
|
1476
|
+
|
|
960
1477
|
---
|
|
961
1478
|
### Interface: VerifyHmacArgs
|
|
962
1479
|
|
|
@@ -1530,13 +2047,14 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
|
|
|
1530
2047
|
|
|
1531
2048
|
| | |
|
|
1532
2049
|
| --- | --- |
|
|
1533
|
-
| [CachedKeyDeriver](#class-cachedkeyderiver) | [
|
|
1534
|
-
| [HTTPWalletJSON](#class-httpwalletjson) | [
|
|
1535
|
-
| [HTTPWalletWire](#class-httpwalletwire) | [
|
|
1536
|
-
| [KeyDeriver](#class-keyderiver) | [
|
|
1537
|
-
| [ProtoWallet](#class-protowallet) | [
|
|
1538
|
-
| [ReactNativeWebView](#class-reactnativewebview) | [
|
|
1539
|
-
| [
|
|
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) | |
|
|
1540
2058
|
|
|
1541
2059
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
|
|
1542
2060
|
|
|
@@ -2586,8 +3104,56 @@ export default class ReactNativeWebView implements WalletInterface {
|
|
|
2586
3104
|
}
|
|
2587
3105
|
```
|
|
2588
3106
|
|
|
2589
|
-
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)
|
|
2590
|
-
|
|
3107
|
+
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)
|
|
3108
|
+
|
|
3109
|
+
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
|
|
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
|
+
|
|
2591
3157
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
|
|
2592
3158
|
|
|
2593
3159
|
---
|
|
@@ -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 desirialized 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,792 @@ 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) | [validateDiscoverByAttributesArgs](#function-validatediscoverbyattributesargs) | [validateOutpointString](#function-validateoutpointstring) |
|
|
4566
|
+
| [parseWalletOutpoint](#function-parsewalletoutpoint) | [validateDiscoverByIdentityKeyArgs](#function-validatediscoverbyidentitykeyargs) | [validatePositiveIntegerOrZero](#function-validatepositiveintegerorzero) |
|
|
4567
|
+
| [toOriginHeader](#function-tooriginheader) | [validateInteger](#function-validateinteger) | [validateProveCertificateArgs](#function-validateprovecertificateargs) |
|
|
4568
|
+
| [validateAbortActionArgs](#function-validateabortactionargs) | [validateInternalizeActionArgs](#function-validateinternalizeactionargs) | [validateRelinquishCertificateArgs](#function-validaterelinquishcertificateargs) |
|
|
4569
|
+
| [validateAcquireDirectCertificateArgs](#function-validateacquiredirectcertificateargs) | [validateInternalizeOutput](#function-validateinternalizeoutput) | [validateRelinquishOutputArgs](#function-validaterelinquishoutputargs) |
|
|
4570
|
+
| [validateAcquireIssuanceCertificateArgs](#function-validateacquireissuancecertificateargs) | [validateListActionsArgs](#function-validatelistactionsargs) | [validateSatoshis](#function-validatesatoshis) |
|
|
4571
|
+
| [validateBasketInsertion](#function-validatebasketinsertion) | [validateListCertificatesArgs](#function-validatelistcertificatesargs) | [validateSignActionArgs](#function-validatesignactionargs) |
|
|
4572
|
+
| [validateCreateActionArgs](#function-validatecreateactionargs) | [validateListOutputsArgs](#function-validatelistoutputsargs) | [validateSignActionOptions](#function-validatesignactionoptions) |
|
|
4573
|
+
| [validateCreateActionInput](#function-validatecreateactioninput) | [validateOptionalInteger](#function-validateoptionalinteger) | [validateStringLength](#function-validatestringlength) |
|
|
4574
|
+
| [validateCreateActionOptions](#function-validatecreateactionoptions) | [validateOptionalOutpointString](#function-validateoptionaloutpointstring) | [validateWalletPayment](#function-validatewalletpayment) |
|
|
4575
|
+
| [validateCreateActionOutput](#function-validatecreateactionoutput) | [validateOriginator](#function-validateoriginator) | |
|
|
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: validateBasketInsertion
|
|
4697
|
+
|
|
4698
|
+
Validate a BasketInsertion structure (basket, custom instructions, tags).
|
|
4699
|
+
|
|
4700
|
+
```ts
|
|
4701
|
+
export function validateBasketInsertion(args?: BasketInsertion): ValidBasketInsertion | undefined
|
|
4702
|
+
```
|
|
4703
|
+
|
|
4704
|
+
See also: [BasketInsertion](./wallet.md#interface-basketinsertion), [ValidBasketInsertion](./wallet.md#interface-validbasketinsertion)
|
|
4705
|
+
|
|
4706
|
+
Returns
|
|
4707
|
+
|
|
4708
|
+
ValidBasketInsertion or undefined
|
|
4709
|
+
|
|
4710
|
+
Argument Details
|
|
4711
|
+
|
|
4712
|
+
+ **args**
|
|
4713
|
+
+ BasketInsertion or undefined
|
|
4714
|
+
|
|
4715
|
+
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
|
|
4716
|
+
|
|
4717
|
+
---
|
|
4718
|
+
### Function: validateCreateActionArgs
|
|
4719
|
+
|
|
4720
|
+
Validate the arguments for creating a new action.
|
|
4721
|
+
|
|
4722
|
+
```ts
|
|
4723
|
+
export function validateCreateActionArgs(args: CreateActionArgs): ValidCreateActionArgs
|
|
4724
|
+
```
|
|
4725
|
+
|
|
4726
|
+
See also: [CreateActionArgs](./wallet.md#interface-createactionargs), [ValidCreateActionArgs](./wallet.md#interface-validcreateactionargs)
|
|
4727
|
+
|
|
4728
|
+
Returns
|
|
4729
|
+
|
|
4730
|
+
validated arguments
|
|
4731
|
+
|
|
4732
|
+
Throws
|
|
4733
|
+
|
|
4734
|
+
primarily WERR_INVALID_PARAMETER if args are invalid.
|
|
4735
|
+
|
|
4736
|
+
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
|
|
4737
|
+
|
|
4738
|
+
---
|
|
4739
|
+
### Function: validateCreateActionInput
|
|
4740
|
+
|
|
4741
|
+
Validate a CreateActionInput structure.
|
|
4742
|
+
|
|
4743
|
+
Ensures either unlockingScript or unlockingScriptLength is provided and consistent,
|
|
4744
|
+
validates outpoint, description length, and sequence number.
|
|
4745
|
+
|
|
4746
|
+
```ts
|
|
4747
|
+
export function validateCreateActionInput(i: CreateActionInput): ValidCreateActionInput
|
|
4748
|
+
```
|
|
4749
|
+
|
|
4750
|
+
See also: [CreateActionInput](./wallet.md#interface-createactioninput), [ValidCreateActionInput](./wallet.md#interface-validcreateactioninput)
|
|
4751
|
+
|
|
4752
|
+
Returns
|
|
4753
|
+
|
|
4754
|
+
ValidCreateActionInput
|
|
4755
|
+
|
|
4756
|
+
Argument Details
|
|
4757
|
+
|
|
4758
|
+
+ **i**
|
|
4759
|
+
+ CreateActionInput to validate
|
|
4760
|
+
|
|
4761
|
+
Throws
|
|
4762
|
+
|
|
4763
|
+
WERR_INVALID_PARAMETER when invalid
|
|
4764
|
+
|
|
4765
|
+
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
|
|
4766
|
+
|
|
4767
|
+
---
|
|
4768
|
+
### Function: validateCreateActionOptions
|
|
4769
|
+
|
|
4770
|
+
Normalize and validate CreateActionOptions, applying defaults for booleans/numbers/arrays.
|
|
4771
|
+
|
|
4772
|
+
```ts
|
|
4773
|
+
export function validateCreateActionOptions(options?: CreateActionOptions): ValidCreateActionOptions
|
|
4774
|
+
```
|
|
4775
|
+
|
|
4776
|
+
See also: [CreateActionOptions](./wallet.md#interface-createactionoptions), [ValidCreateActionOptions](./wallet.md#interface-validcreateactionoptions)
|
|
4777
|
+
|
|
4778
|
+
Returns
|
|
4779
|
+
|
|
4780
|
+
ValidCreateActionOptions with defaults applied
|
|
4781
|
+
|
|
4782
|
+
Argument Details
|
|
4783
|
+
|
|
4784
|
+
+ **options**
|
|
4785
|
+
+ CreateActionOptions or undefined
|
|
4786
|
+
|
|
4787
|
+
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
|
|
4788
|
+
|
|
4789
|
+
---
|
|
4790
|
+
### Function: validateCreateActionOutput
|
|
4791
|
+
|
|
4792
|
+
Validate CreateActionOutput fields: locking script, satoshis, description, basket, tags.
|
|
4793
|
+
|
|
4794
|
+
```ts
|
|
4795
|
+
export function validateCreateActionOutput(o: CreateActionOutput): ValidCreateActionOutput
|
|
4796
|
+
```
|
|
4797
|
+
|
|
4798
|
+
See also: [CreateActionOutput](./wallet.md#interface-createactionoutput), [ValidCreateActionOutput](./wallet.md#interface-validcreateactionoutput)
|
|
4799
|
+
|
|
4800
|
+
Returns
|
|
4801
|
+
|
|
4802
|
+
ValidCreateActionOutput
|
|
4803
|
+
|
|
4804
|
+
Argument Details
|
|
4805
|
+
|
|
4806
|
+
+ **o**
|
|
4807
|
+
+ CreateActionOutput to validate
|
|
4808
|
+
|
|
4809
|
+
Throws
|
|
4810
|
+
|
|
4811
|
+
WERR_INVALID_PARAMETER when invalid
|
|
4812
|
+
|
|
4813
|
+
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
|
|
4814
|
+
|
|
4815
|
+
---
|
|
4816
|
+
### Function: validateDiscoverByAttributesArgs
|
|
4817
|
+
|
|
4818
|
+
Validate DiscoverByAttributesArgs: attributes, limit, offset, and permission flag.
|
|
4819
|
+
|
|
4820
|
+
```ts
|
|
4821
|
+
export function validateDiscoverByAttributesArgs(args: DiscoverByAttributesArgs): ValidDiscoverByAttributesArgs
|
|
4822
|
+
```
|
|
4823
|
+
|
|
4824
|
+
See also: [DiscoverByAttributesArgs](./wallet.md#interface-discoverbyattributesargs), [ValidDiscoverByAttributesArgs](./wallet.md#interface-validdiscoverbyattributesargs)
|
|
4825
|
+
|
|
4826
|
+
Returns
|
|
4827
|
+
|
|
4828
|
+
ValidDiscoverByAttributesArgs
|
|
4829
|
+
|
|
4830
|
+
Argument Details
|
|
4831
|
+
|
|
4832
|
+
+ **args**
|
|
4833
|
+
+ DiscoverByAttributesArgs
|
|
4834
|
+
|
|
4835
|
+
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
|
|
4836
|
+
|
|
4837
|
+
---
|
|
4838
|
+
### Function: validateDiscoverByIdentityKeyArgs
|
|
4839
|
+
|
|
4840
|
+
Validate DiscoverByIdentityKeyArgs, enforcing identity key length and defaults.
|
|
4841
|
+
|
|
4842
|
+
```ts
|
|
4843
|
+
export function validateDiscoverByIdentityKeyArgs(args: DiscoverByIdentityKeyArgs): ValidDiscoverByIdentityKeyArgs
|
|
4844
|
+
```
|
|
4845
|
+
|
|
4846
|
+
See also: [DiscoverByIdentityKeyArgs](./wallet.md#interface-discoverbyidentitykeyargs), [ValidDiscoverByIdentityKeyArgs](./wallet.md#interface-validdiscoverbyidentitykeyargs)
|
|
4847
|
+
|
|
4848
|
+
Returns
|
|
4849
|
+
|
|
4850
|
+
ValidDiscoverByIdentityKeyArgs
|
|
4851
|
+
|
|
4852
|
+
Argument Details
|
|
4853
|
+
|
|
4854
|
+
+ **args**
|
|
4855
|
+
+ DiscoverByIdentityKeyArgs
|
|
4856
|
+
|
|
4857
|
+
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
|
|
4858
|
+
|
|
4859
|
+
---
|
|
4860
|
+
### Function: validateInteger
|
|
4861
|
+
|
|
4862
|
+
Validate an integer, applying an optional default.
|
|
4863
|
+
|
|
4864
|
+
```ts
|
|
4865
|
+
export function validateInteger(v: number | undefined, name: string, defaultValue?: number, min?: number, max?: number): number
|
|
4866
|
+
```
|
|
4867
|
+
|
|
4868
|
+
Returns
|
|
4869
|
+
|
|
4870
|
+
validated integer
|
|
4871
|
+
|
|
4872
|
+
Argument Details
|
|
4873
|
+
|
|
4874
|
+
+ **v**
|
|
4875
|
+
+ value to validate (may be undefined)
|
|
4876
|
+
+ **name**
|
|
4877
|
+
+ parameter name used in error messages
|
|
4878
|
+
+ **defaultValue**
|
|
4879
|
+
+ value to return when v is undefined
|
|
4880
|
+
+ **min**
|
|
4881
|
+
+ optional minimum allowed value
|
|
4882
|
+
+ **max**
|
|
4883
|
+
+ optional maximum allowed value
|
|
4884
|
+
|
|
4885
|
+
Throws
|
|
4886
|
+
|
|
4887
|
+
WERR_INVALID_PARAMETER when invalid
|
|
4888
|
+
|
|
4889
|
+
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
|
|
4890
|
+
|
|
4891
|
+
---
|
|
4892
|
+
### Function: validateInternalizeActionArgs
|
|
4893
|
+
|
|
4894
|
+
Validate InternalizeActionArgs: tx, outputs, description, labels, permission flag.
|
|
4895
|
+
|
|
4896
|
+
```ts
|
|
4897
|
+
export function validateInternalizeActionArgs(args: InternalizeActionArgs): ValidInternalizeActionArgs
|
|
4898
|
+
```
|
|
4899
|
+
|
|
4900
|
+
See also: [InternalizeActionArgs](./wallet.md#interface-internalizeactionargs), [ValidInternalizeActionArgs](./wallet.md#interface-validinternalizeactionargs)
|
|
4901
|
+
|
|
4902
|
+
Returns
|
|
4903
|
+
|
|
4904
|
+
ValidInternalizeActionArgs
|
|
4905
|
+
|
|
4906
|
+
Argument Details
|
|
4907
|
+
|
|
4908
|
+
+ **args**
|
|
4909
|
+
+ InternalizeActionArgs to validate
|
|
4910
|
+
|
|
4911
|
+
Throws
|
|
4912
|
+
|
|
4913
|
+
WERR_INVALID_PARAMETER when invalid
|
|
4914
|
+
|
|
4915
|
+
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
|
|
4916
|
+
|
|
4917
|
+
---
|
|
4918
|
+
### Function: validateInternalizeOutput
|
|
4919
|
+
|
|
4920
|
+
Validate an InternalizeOutput entry.
|
|
4921
|
+
|
|
4922
|
+
```ts
|
|
4923
|
+
export function validateInternalizeOutput(args: InternalizeOutput): ValidInternalizeOutput
|
|
4924
|
+
```
|
|
4925
|
+
|
|
4926
|
+
See also: [InternalizeOutput](./wallet.md#interface-internalizeoutput), [ValidInternalizeOutput](./wallet.md#interface-validinternalizeoutput)
|
|
4927
|
+
|
|
4928
|
+
Returns
|
|
4929
|
+
|
|
4930
|
+
ValidInternalizeOutput
|
|
4931
|
+
|
|
4932
|
+
Argument Details
|
|
4933
|
+
|
|
4934
|
+
+ **args**
|
|
4935
|
+
+ InternalizeOutput to validate
|
|
3974
4936
|
|
|
3975
4937
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
|
|
3976
4938
|
|
|
3977
4939
|
---
|
|
3978
|
-
|
|
4940
|
+
### Function: validateListActionsArgs
|
|
3979
4941
|
|
|
3980
|
-
|
|
4942
|
+
```ts
|
|
4943
|
+
export function validateListActionsArgs(args: ListActionsArgs): ValidListActionsArgs
|
|
4944
|
+
```
|
|
4945
|
+
|
|
4946
|
+
See also: [ListActionsArgs](./wallet.md#interface-listactionsargs), [ValidListActionsArgs](./wallet.md#interface-validlistactionsargs)
|
|
4947
|
+
|
|
4948
|
+
Argument Details
|
|
4949
|
+
|
|
4950
|
+
+ **args.labels**
|
|
4951
|
+
+ An array of labels used to filter actions.
|
|
4952
|
+
+ **args.labelQueryMode**
|
|
4953
|
+
+ Optional. Specifies how to match labels (default is any which matches any of the labels).
|
|
4954
|
+
+ **args.includeLabels**
|
|
4955
|
+
+ Optional. Whether to include transaction labels in the result set.
|
|
4956
|
+
+ **args.includeInputs**
|
|
4957
|
+
+ Optional. Whether to include input details in the result set.
|
|
4958
|
+
+ **args.includeInputSourceLockingScripts**
|
|
4959
|
+
+ Optional. Whether to include input source locking scripts in the result set.
|
|
4960
|
+
+ **args.includeInputUnlockingScripts**
|
|
4961
|
+
+ Optional. Whether to include input unlocking scripts in the result set.
|
|
4962
|
+
+ **args.includeOutputs**
|
|
4963
|
+
+ Optional. Whether to include output details in the result set.
|
|
4964
|
+
+ **args.includeOutputLockingScripts**
|
|
4965
|
+
+ Optional. Whether to include output locking scripts in the result set.
|
|
4966
|
+
+ **args.limit**
|
|
4967
|
+
+ Optional. The maximum number of transactions to retrieve.
|
|
4968
|
+
+ **args.offset**
|
|
4969
|
+
+ Optional. Number of transactions to skip before starting to return the results.
|
|
4970
|
+
+ **args.seekPermission**
|
|
4971
|
+
+ — 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.
|
|
4972
|
+
|
|
4973
|
+
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
|
|
4974
|
+
|
|
4975
|
+
---
|
|
4976
|
+
### Function: validateListCertificatesArgs
|
|
4977
|
+
|
|
4978
|
+
Validate ListCertificatesArgs: certifiers, types, paging, and optional privileged reason.
|
|
3981
4979
|
|
|
3982
4980
|
```ts
|
|
3983
|
-
export function
|
|
4981
|
+
export function validateListCertificatesArgs(args: ListCertificatesArgs): ValidListCertificatesArgs
|
|
4982
|
+
```
|
|
4983
|
+
|
|
4984
|
+
See also: [ListCertificatesArgs](./wallet.md#interface-listcertificatesargs), [ValidListCertificatesArgs](./wallet.md#interface-validlistcertificatesargs)
|
|
4985
|
+
|
|
4986
|
+
Returns
|
|
4987
|
+
|
|
4988
|
+
ValidListCertificatesArgs
|
|
4989
|
+
|
|
4990
|
+
Argument Details
|
|
4991
|
+
|
|
4992
|
+
+ **args**
|
|
4993
|
+
+ ListCertificatesArgs
|
|
4994
|
+
|
|
4995
|
+
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
|
|
4996
|
+
|
|
4997
|
+
---
|
|
4998
|
+
### Function: validateListOutputsArgs
|
|
4999
|
+
|
|
5000
|
+
```ts
|
|
5001
|
+
export function validateListOutputsArgs(args: ListOutputsArgs): ValidListOutputsArgs
|
|
5002
|
+
```
|
|
5003
|
+
|
|
5004
|
+
See also: [ListOutputsArgs](./wallet.md#interface-listoutputsargs), [ValidListOutputsArgs](./wallet.md#interface-validlistoutputsargs)
|
|
5005
|
+
|
|
5006
|
+
Argument Details
|
|
5007
|
+
|
|
5008
|
+
+ **args.basket**
|
|
5009
|
+
+ Required. The associated basket name whose outputs should be listed.
|
|
5010
|
+
+ **args.tags**
|
|
5011
|
+
+ Optional. Filter outputs based on these tags.
|
|
5012
|
+
+ **args.tagQueryMode**
|
|
5013
|
+
+ Optional. Filter mode, defining whether all or any of the tags must match. By default, any tag can match.
|
|
5014
|
+
+ **args.include**
|
|
5015
|
+
+ 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.
|
|
5016
|
+
+ **args.includeEntireTransactions**
|
|
5017
|
+
+ Optional. Whether to include the entire transaction(s) in the result.
|
|
5018
|
+
+ **args.includeCustomInstructions**
|
|
5019
|
+
+ Optional. Whether custom instructions should be returned in the result.
|
|
5020
|
+
+ **args.includeTags**
|
|
5021
|
+
+ Optional. Whether the tags associated with the output should be returned.
|
|
5022
|
+
+ **args.includeLabels**
|
|
5023
|
+
+ Optional. Whether the labels associated with the transaction containing the output should be returned.
|
|
5024
|
+
+ **args.limit**
|
|
5025
|
+
+ Optional limit on the number of outputs to return.
|
|
5026
|
+
+ **args.offset**
|
|
5027
|
+
+ If positive or zero: Number of outputs to skip before starting to return results, oldest first.
|
|
5028
|
+
If negative: Outputs are returned newest first and offset of -1 is the newest output.
|
|
5029
|
+
When using negative offsets, caution is required as new outputs may be added between calls,
|
|
5030
|
+
potentially causing outputs to be duplicated across calls.
|
|
5031
|
+
+ **args.seekPermission**
|
|
5032
|
+
+ — 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.
|
|
5033
|
+
|
|
5034
|
+
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
|
|
5035
|
+
|
|
5036
|
+
---
|
|
5037
|
+
### Function: validateOptionalInteger
|
|
5038
|
+
|
|
5039
|
+
Validate an optional integer. Returns undefined or the validated integer.
|
|
5040
|
+
|
|
5041
|
+
```ts
|
|
5042
|
+
export function validateOptionalInteger(v: number | undefined, name: string, min?: number, max?: number): number | undefined
|
|
5043
|
+
```
|
|
5044
|
+
|
|
5045
|
+
Returns
|
|
5046
|
+
|
|
5047
|
+
validated integer or undefined
|
|
5048
|
+
|
|
5049
|
+
Argument Details
|
|
5050
|
+
|
|
5051
|
+
+ **v**
|
|
5052
|
+
+ value to validate (may be undefined)
|
|
5053
|
+
+ **name**
|
|
5054
|
+
+ parameter name used in error messages
|
|
5055
|
+
+ **min**
|
|
5056
|
+
+ optional minimum value
|
|
5057
|
+
+ **max**
|
|
5058
|
+
+ optional maximum value
|
|
5059
|
+
|
|
5060
|
+
Throws
|
|
5061
|
+
|
|
5062
|
+
WERR_INVALID_PARAMETER when invalid
|
|
5063
|
+
|
|
5064
|
+
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
|
|
5065
|
+
|
|
5066
|
+
---
|
|
5067
|
+
### Function: validateOptionalOutpointString
|
|
5068
|
+
|
|
5069
|
+
Validate an optional outpoint string (txid.vout).
|
|
5070
|
+
|
|
5071
|
+
```ts
|
|
5072
|
+
export function validateOptionalOutpointString(outpoint: string | undefined, name: string): string | undefined
|
|
5073
|
+
```
|
|
5074
|
+
|
|
5075
|
+
Returns
|
|
5076
|
+
|
|
5077
|
+
validated outpoint string or undefined
|
|
5078
|
+
|
|
5079
|
+
Argument Details
|
|
5080
|
+
|
|
5081
|
+
+ **outpoint**
|
|
5082
|
+
+ outpoint string or undefined
|
|
5083
|
+
+ **name**
|
|
5084
|
+
+ parameter name used in error messages
|
|
5085
|
+
|
|
5086
|
+
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
|
|
5087
|
+
|
|
5088
|
+
---
|
|
5089
|
+
### Function: validateOriginator
|
|
5090
|
+
|
|
5091
|
+
Validate originator string (trim/lowercase and part length checks).
|
|
5092
|
+
|
|
5093
|
+
```ts
|
|
5094
|
+
export function validateOriginator(s?: string): string | undefined
|
|
5095
|
+
```
|
|
5096
|
+
|
|
5097
|
+
Returns
|
|
5098
|
+
|
|
5099
|
+
normalized originator or undefined
|
|
5100
|
+
|
|
5101
|
+
Argument Details
|
|
5102
|
+
|
|
5103
|
+
+ **s**
|
|
5104
|
+
+ originator string or undefined
|
|
5105
|
+
|
|
5106
|
+
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
|
|
5107
|
+
|
|
5108
|
+
---
|
|
5109
|
+
### Function: validateOutpointString
|
|
5110
|
+
|
|
5111
|
+
Validate an outpoint string of the form txid.vout.
|
|
5112
|
+
|
|
5113
|
+
```ts
|
|
5114
|
+
export function validateOutpointString(outpoint: string, name: string): string
|
|
5115
|
+
```
|
|
5116
|
+
|
|
5117
|
+
Returns
|
|
5118
|
+
|
|
5119
|
+
normalized outpoint string (validated txid and vout)
|
|
5120
|
+
|
|
5121
|
+
Argument Details
|
|
5122
|
+
|
|
5123
|
+
+ **outpoint**
|
|
5124
|
+
+ outpoint string
|
|
5125
|
+
+ **name**
|
|
5126
|
+
+ parameter name used in error messages
|
|
5127
|
+
|
|
5128
|
+
Throws
|
|
5129
|
+
|
|
5130
|
+
WERR_INVALID_PARAMETER when invalid
|
|
5131
|
+
|
|
5132
|
+
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
|
|
5133
|
+
|
|
5134
|
+
---
|
|
5135
|
+
### Function: validatePositiveIntegerOrZero
|
|
5136
|
+
|
|
5137
|
+
Validate a non-negative integer (zero allowed).
|
|
5138
|
+
|
|
5139
|
+
```ts
|
|
5140
|
+
export function validatePositiveIntegerOrZero(v: number, name: string): number
|
|
5141
|
+
```
|
|
5142
|
+
|
|
5143
|
+
Returns
|
|
5144
|
+
|
|
5145
|
+
validated integer
|
|
5146
|
+
|
|
5147
|
+
Argument Details
|
|
5148
|
+
|
|
5149
|
+
+ **v**
|
|
5150
|
+
+ value to validate
|
|
5151
|
+
+ **name**
|
|
5152
|
+
+ parameter name used in error messages
|
|
5153
|
+
|
|
5154
|
+
Throws
|
|
5155
|
+
|
|
5156
|
+
WERR_INVALID_PARAMETER when invalid
|
|
5157
|
+
|
|
5158
|
+
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
|
|
5159
|
+
|
|
5160
|
+
---
|
|
5161
|
+
### Function: validateProveCertificateArgs
|
|
5162
|
+
|
|
5163
|
+
Validate ProveCertificateArgs including optional certificate fields and reveal list.
|
|
5164
|
+
|
|
5165
|
+
```ts
|
|
5166
|
+
export function validateProveCertificateArgs(args: ProveCertificateArgs): ValidProveCertificateArgs
|
|
5167
|
+
```
|
|
5168
|
+
|
|
5169
|
+
See also: [ProveCertificateArgs](./wallet.md#interface-provecertificateargs), [ValidProveCertificateArgs](./wallet.md#interface-validprovecertificateargs)
|
|
5170
|
+
|
|
5171
|
+
Returns
|
|
5172
|
+
|
|
5173
|
+
ValidProveCertificateArgs
|
|
5174
|
+
|
|
5175
|
+
Argument Details
|
|
5176
|
+
|
|
5177
|
+
+ **args**
|
|
5178
|
+
+ ProveCertificateArgs
|
|
5179
|
+
|
|
5180
|
+
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
|
|
5181
|
+
|
|
5182
|
+
---
|
|
5183
|
+
### Function: validateRelinquishCertificateArgs
|
|
5184
|
+
|
|
5185
|
+
Validate RelinquishCertificateArgs (type, serialNumber, certifier).
|
|
5186
|
+
|
|
5187
|
+
```ts
|
|
5188
|
+
export function validateRelinquishCertificateArgs(args: RelinquishCertificateArgs): ValidRelinquishCertificateArgs
|
|
5189
|
+
```
|
|
5190
|
+
|
|
5191
|
+
See also: [RelinquishCertificateArgs](./wallet.md#interface-relinquishcertificateargs), [ValidRelinquishCertificateArgs](./wallet.md#interface-validrelinquishcertificateargs)
|
|
5192
|
+
|
|
5193
|
+
Returns
|
|
5194
|
+
|
|
5195
|
+
ValidRelinquishCertificateArgs
|
|
5196
|
+
|
|
5197
|
+
Argument Details
|
|
5198
|
+
|
|
5199
|
+
+ **args**
|
|
5200
|
+
+ RelinquishCertificateArgs
|
|
5201
|
+
|
|
5202
|
+
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
|
|
5203
|
+
|
|
5204
|
+
---
|
|
5205
|
+
### Function: validateRelinquishOutputArgs
|
|
5206
|
+
|
|
5207
|
+
Validate RelinquishOutputArgs (basket and output).
|
|
5208
|
+
|
|
5209
|
+
```ts
|
|
5210
|
+
export function validateRelinquishOutputArgs(args: RelinquishOutputArgs): ValidRelinquishOutputArgs
|
|
5211
|
+
```
|
|
5212
|
+
|
|
5213
|
+
See also: [RelinquishOutputArgs](./wallet.md#interface-relinquishoutputargs), [ValidRelinquishOutputArgs](./wallet.md#interface-validrelinquishoutputargs)
|
|
5214
|
+
|
|
5215
|
+
Returns
|
|
5216
|
+
|
|
5217
|
+
ValidRelinquishOutputArgs
|
|
5218
|
+
|
|
5219
|
+
Argument Details
|
|
5220
|
+
|
|
5221
|
+
+ **args**
|
|
5222
|
+
+ RelinquishOutputArgs
|
|
5223
|
+
|
|
5224
|
+
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
|
|
5225
|
+
|
|
5226
|
+
---
|
|
5227
|
+
### Function: validateSatoshis
|
|
5228
|
+
|
|
5229
|
+
Validate a satoshi amount.
|
|
5230
|
+
|
|
5231
|
+
```ts
|
|
5232
|
+
export function validateSatoshis(v: number | undefined, name: string, min?: number): number
|
|
5233
|
+
```
|
|
5234
|
+
|
|
5235
|
+
Returns
|
|
5236
|
+
|
|
5237
|
+
validated satoshi number
|
|
5238
|
+
|
|
5239
|
+
Argument Details
|
|
5240
|
+
|
|
5241
|
+
+ **v**
|
|
5242
|
+
+ value to validate (integer number of satoshis)
|
|
5243
|
+
+ **name**
|
|
5244
|
+
+ parameter name used in error messages
|
|
5245
|
+
+ **min**
|
|
5246
|
+
+ optional minimum allowed satoshi value
|
|
5247
|
+
|
|
5248
|
+
Throws
|
|
5249
|
+
|
|
5250
|
+
WERR_INVALID_PARAMETER when invalid
|
|
5251
|
+
|
|
5252
|
+
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
|
|
5253
|
+
|
|
5254
|
+
---
|
|
5255
|
+
### Function: validateSignActionArgs
|
|
5256
|
+
|
|
5257
|
+
Validate SignActionArgs and apply defaults/flags.
|
|
5258
|
+
|
|
5259
|
+
```ts
|
|
5260
|
+
export function validateSignActionArgs(args: SignActionArgs): ValidSignActionArgs
|
|
5261
|
+
```
|
|
5262
|
+
|
|
5263
|
+
See also: [SignActionArgs](./wallet.md#interface-signactionargs), [ValidSignActionArgs](./wallet.md#interface-validsignactionargs)
|
|
5264
|
+
|
|
5265
|
+
Returns
|
|
5266
|
+
|
|
5267
|
+
ValidSignActionArgs
|
|
5268
|
+
|
|
5269
|
+
Argument Details
|
|
5270
|
+
|
|
5271
|
+
+ **args**
|
|
5272
|
+
+ SignActionArgs to validate
|
|
5273
|
+
|
|
5274
|
+
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
|
|
5275
|
+
|
|
5276
|
+
---
|
|
5277
|
+
### Function: validateSignActionOptions
|
|
5278
|
+
|
|
5279
|
+
Set all default true/false booleans to true or false if undefined.
|
|
5280
|
+
Set all possibly undefined numbers to their default values.
|
|
5281
|
+
Set all possibly undefined arrays to empty arrays.
|
|
5282
|
+
Convert string outpoints to `{ txid: string, vout: number }`
|
|
5283
|
+
|
|
5284
|
+
```ts
|
|
5285
|
+
export function validateSignActionOptions(options?: SignActionOptions): ValidSignActionOptions
|
|
5286
|
+
```
|
|
5287
|
+
|
|
5288
|
+
See also: [SignActionOptions](./wallet.md#interface-signactionoptions), [ValidSignActionOptions](./wallet.md#interface-validsignactionoptions)
|
|
5289
|
+
|
|
5290
|
+
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
|
|
5291
|
+
|
|
5292
|
+
---
|
|
5293
|
+
### Function: validateStringLength
|
|
5294
|
+
|
|
5295
|
+
Validate string length in bytes for UTF-8 encoded string.
|
|
5296
|
+
|
|
5297
|
+
```ts
|
|
5298
|
+
export function validateStringLength(s: string, name: string, min?: number, max?: number): string
|
|
5299
|
+
```
|
|
5300
|
+
|
|
5301
|
+
Returns
|
|
5302
|
+
|
|
5303
|
+
the original string when valid
|
|
5304
|
+
|
|
5305
|
+
Argument Details
|
|
5306
|
+
|
|
5307
|
+
+ **s**
|
|
5308
|
+
+ string to validate
|
|
5309
|
+
+ **name**
|
|
5310
|
+
+ parameter name used in error messages
|
|
5311
|
+
+ **min**
|
|
5312
|
+
+ optional minimum byte length
|
|
5313
|
+
+ **max**
|
|
5314
|
+
+ optional maximum byte length
|
|
5315
|
+
|
|
5316
|
+
Throws
|
|
5317
|
+
|
|
5318
|
+
WERR_INVALID_PARAMETER when invalid
|
|
5319
|
+
|
|
5320
|
+
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
|
|
5321
|
+
|
|
5322
|
+
---
|
|
5323
|
+
### Function: validateWalletPayment
|
|
5324
|
+
|
|
5325
|
+
Validate wallet payment remittance structure.
|
|
5326
|
+
|
|
5327
|
+
```ts
|
|
5328
|
+
export function validateWalletPayment(args?: WalletPayment): ValidWalletPayment | undefined
|
|
3984
5329
|
```
|
|
3985
5330
|
|
|
5331
|
+
See also: [ValidWalletPayment](./wallet.md#interface-validwalletpayment), [WalletPayment](./wallet.md#interface-walletpayment)
|
|
5332
|
+
|
|
5333
|
+
Returns
|
|
5334
|
+
|
|
5335
|
+
ValidWalletPayment or undefined
|
|
5336
|
+
|
|
5337
|
+
Argument Details
|
|
5338
|
+
|
|
5339
|
+
+ **args**
|
|
5340
|
+
+ WalletPayment or undefined
|
|
5341
|
+
|
|
3986
5342
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
|
|
3987
5343
|
|
|
3988
5344
|
---
|
|
@@ -3990,21 +5346,21 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
|
|
|
3990
5346
|
|
|
3991
5347
|
| | | |
|
|
3992
5348
|
| --- | --- | --- |
|
|
3993
|
-
| [AcquireCertificateResult](#type-acquirecertificateresult) | [
|
|
3994
|
-
| [AcquisitionProtocol](#type-acquisitionprotocol) | [
|
|
3995
|
-
| [ActionStatus](#type-actionstatus) | [
|
|
3996
|
-
| [AtomicBEEF](#type-atomicbeef) | [
|
|
3997
|
-
| [BEEF](#type-beef) | [
|
|
3998
|
-
| [Base64String](#type-base64string) | [
|
|
3999
|
-
| [BasketStringUnder300Bytes](#type-basketstringunder300bytes) | [
|
|
4000
|
-
| [BooleanDefaultFalse](#type-booleandefaultfalse) | [
|
|
4001
|
-
| [BooleanDefaultTrue](#type-booleandefaulttrue) | [
|
|
4002
|
-
| [Byte](#type-byte) | [
|
|
4003
|
-
| [CallType](#type-calltype) | [
|
|
4004
|
-
| [CertificateFieldNameUnder50Bytes](#type-certificatefieldnameunder50bytes) | [
|
|
4005
|
-
| [Counterparty](#type-counterparty) | [
|
|
5349
|
+
| [AcquireCertificateResult](#type-acquirecertificateresult) | [EntityIconURLStringMax500Bytes](#type-entityiconurlstringmax500bytes) | [PositiveIntegerOrZero](#type-positiveintegerorzero) |
|
|
5350
|
+
| [AcquisitionProtocol](#type-acquisitionprotocol) | [EntityNameStringMax100Bytes](#type-entitynamestringmax100bytes) | [ProtocolString5To400Bytes](#type-protocolstring5to400bytes) |
|
|
5351
|
+
| [ActionStatus](#type-actionstatus) | [ErrorCodeString10To40Bytes](#type-errorcodestring10to40bytes) | [PubKeyHex](#type-pubkeyhex) |
|
|
5352
|
+
| [AtomicBEEF](#type-atomicbeef) | [ErrorDescriptionString20To200Bytes](#type-errordescriptionstring20to200bytes) | [ReviewActionResultStatus](#type-reviewactionresultstatus) |
|
|
5353
|
+
| [BEEF](#type-beef) | [HexString](#type-hexstring) | [SatoshiValue](#type-satoshivalue) |
|
|
5354
|
+
| [Base64String](#type-base64string) | [ISOTimestampString](#type-isotimestampstring) | [SecurityLevel](#type-securitylevel) |
|
|
5355
|
+
| [BasketStringUnder300Bytes](#type-basketstringunder300bytes) | [KeyIDStringUnder800Bytes](#type-keyidstringunder800bytes) | [SendWithResultStatus](#type-sendwithresultstatus) |
|
|
5356
|
+
| [BooleanDefaultFalse](#type-booleandefaultfalse) | [KeyringRevealer](#type-keyringrevealer) | [TXIDHexString](#type-txidhexstring) |
|
|
5357
|
+
| [BooleanDefaultTrue](#type-booleandefaulttrue) | [LabelStringUnder300Bytes](#type-labelstringunder300bytes) | [TrustSelf](#type-trustself) |
|
|
5358
|
+
| [Byte](#type-byte) | [OriginatorDomainNameStringUnder250Bytes](#type-originatordomainnamestringunder250bytes) | [VersionString7To30Bytes](#type-versionstring7to30bytes) |
|
|
5359
|
+
| [CallType](#type-calltype) | [OutpointString](#type-outpointstring) | [WalletCounterparty](#type-walletcounterparty) |
|
|
5360
|
+
| [CertificateFieldNameUnder50Bytes](#type-certificatefieldnameunder50bytes) | [OutputTagStringUnder300Bytes](#type-outputtagstringunder300bytes) | [WalletErrorCode](#type-walleterrorcode) |
|
|
5361
|
+
| [Counterparty](#type-counterparty) | [PositiveInteger](#type-positiveinteger) | [WalletNetwork](#type-walletnetwork) |
|
|
5362
|
+
| [DescriptionString5to2000Bytes](#type-descriptionstring5to2000bytes) | [PositiveIntegerDefault10Max10000](#type-positiveintegerdefault10max10000) | [WalletProtocol](#type-walletprotocol) |
|
|
4006
5363
|
| [DescriptionString5to50Bytes](#type-descriptionstring5to50bytes) | [PositiveIntegerMax10](#type-positiveintegermax10) | |
|
|
4007
|
-
| [EntityIconURLStringMax500Bytes](#type-entityiconurlstringmax500bytes) | [PositiveIntegerOrZero](#type-positiveintegerorzero) | |
|
|
4008
5364
|
|
|
4009
5365
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
|
|
4010
5366
|
|
|
@@ -4134,6 +5490,17 @@ See also: [PubKeyHex](./wallet.md#type-pubkeyhex), [PublicKey](./primitives.md#c
|
|
|
4134
5490
|
|
|
4135
5491
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
|
|
4136
5492
|
|
|
5493
|
+
---
|
|
5494
|
+
### Type: DescriptionString5to2000Bytes
|
|
5495
|
+
|
|
5496
|
+
DescriptionString5to2000Bytes alias type (documented).
|
|
5497
|
+
|
|
5498
|
+
```ts
|
|
5499
|
+
export type DescriptionString5to2000Bytes = string
|
|
5500
|
+
```
|
|
5501
|
+
|
|
5502
|
+
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
|
|
5503
|
+
|
|
4137
5504
|
---
|
|
4138
5505
|
### Type: DescriptionString5to50Bytes
|
|
4139
5506
|
|
|
@@ -4474,7 +5841,9 @@ export enum walletErrors {
|
|
|
4474
5841
|
unsupportedAction = 2,
|
|
4475
5842
|
invalidHmac = 3,
|
|
4476
5843
|
invalidSignature = 4,
|
|
4477
|
-
reviewActions = 5
|
|
5844
|
+
reviewActions = 5,
|
|
5845
|
+
invalidParameter = 6,
|
|
5846
|
+
insufficientFunds = 7
|
|
4478
5847
|
}
|
|
4479
5848
|
```
|
|
4480
5849
|
|
|
@@ -4483,3 +5852,12 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
|
|
|
4483
5852
|
---
|
|
4484
5853
|
## Variables
|
|
4485
5854
|
|
|
5855
|
+
### Variable: specOpThrowReviewActions
|
|
5856
|
+
|
|
5857
|
+
```ts
|
|
5858
|
+
specOpThrowReviewActions = "a496e747fc3ad5fabdd4ae8f91184e71f87539bd3d962aa2548942faaaf0047a"
|
|
5859
|
+
```
|
|
5860
|
+
|
|
5861
|
+
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Enums](#enums), [Variables](#variables)
|
|
5862
|
+
|
|
5863
|
+
---
|