mirror of
https://github.com/Xahau/xahau.js.git
synced 2025-11-04 21:15:47 +00:00
Add support for WalletLocator (#1083)
Being able to fetch the WalletLocator field opens up new use-cases. The field can store for example a transaction hash, referencing a transaction with memos containing useful data.
This commit is contained in:
@@ -3948,6 +3948,7 @@ return api.getSettings(address).then(settings =>
|
||||
"requireDestinationTag": true,
|
||||
"disallowIncomingXRP": true,
|
||||
"emailHash": "23463B99B62A72F26ED677CC556C44E8",
|
||||
"walletLocator": "00000000000000000000000000000000000000000000000000000000DEADBEEF",
|
||||
"domain": "example.com",
|
||||
"transferRate": 1.002,
|
||||
"tickSize": 5,
|
||||
|
||||
@@ -75,6 +75,7 @@ const AccountFlagIndices = {
|
||||
const AccountFields = {
|
||||
EmailHash: {name: 'emailHash', encoding: 'hex',
|
||||
length: 32, defaults: '00000000000000000000000000000000'},
|
||||
WalletLocator: {name: 'walletLocator'},
|
||||
MessageKey: {name: 'messageKey'},
|
||||
Domain: {name: 'domain', encoding: 'hex'},
|
||||
TransferRate: {name: 'transferRate', defaults: 0, shift: 9},
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
},
|
||||
"domain": {
|
||||
"type": "string",
|
||||
"description": " The domain that owns this account, as a hexadecimal string representing the ASCII for the domain in lowercase."
|
||||
"description": "The domain that owns this account, as a hexadecimal string representing the ASCII for the domain in lowercase."
|
||||
},
|
||||
"emailHash": {
|
||||
"description": "Hash of an email address to be used for generating an avatar image. Conventionally, clients use Gravatar to display this image. Use `null` to clear.",
|
||||
@@ -30,6 +30,13 @@
|
||||
{"$ref": "hash128"}
|
||||
]
|
||||
},
|
||||
"walletLocator": {
|
||||
"description": "Transaction hash or any other 64 character hexadecimal string, that may or may not represent the result of a hash operation. Use `null` to clear.",
|
||||
"oneOf": [
|
||||
{"type": "null"},
|
||||
{"$ref": "hash256"}
|
||||
]
|
||||
},
|
||||
"enableTransactionIDTracking": {
|
||||
"type": "boolean",
|
||||
"description": "Track the ID of this account’s most recent transaction."
|
||||
|
||||
@@ -17,7 +17,7 @@ export interface AccountRootLedgerEntry {
|
||||
RegularKey?: string,
|
||||
TickSize?: number,
|
||||
TransferRate?: number,
|
||||
WalletLocator?: string, // DEPRECATED
|
||||
WalletLocator?: string,
|
||||
WalletSize?: number // DEPRECATED
|
||||
}
|
||||
|
||||
|
||||
@@ -17,6 +17,7 @@ export type FormattedSettings = {
|
||||
disallowIncomingXRP?: boolean,
|
||||
domain?: string,
|
||||
emailHash?: string|null,
|
||||
walletLocator?: string|null,
|
||||
enableTransactionIDTracking?: boolean,
|
||||
globalFreeze?: boolean,
|
||||
memos?: Memo[],
|
||||
|
||||
1
test/fixtures/responses/get-settings.json
vendored
1
test/fixtures/responses/get-settings.json
vendored
@@ -2,6 +2,7 @@
|
||||
"requireDestinationTag": true,
|
||||
"disallowIncomingXRP": true,
|
||||
"emailHash": "23463B99B62A72F26ED677CC556C44E8",
|
||||
"walletLocator": "00000000000000000000000000000000000000000000000000000000DEADBEEF",
|
||||
"domain": "example.com",
|
||||
"transferRate": 1.002,
|
||||
"tickSize": 5,
|
||||
|
||||
Reference in New Issue
Block a user