UserInfo includes ndebit
This commit is contained in:
parent
bed397e424
commit
143fe44589
6 changed files with 15 additions and 4 deletions
|
|
@ -1042,6 +1042,7 @@ The nostr server will send back a message response, and inside the body there wi
|
|||
### UserInfo
|
||||
- __balance__: _number_
|
||||
- __max_withdrawable__: _number_
|
||||
- __ndebit__: _string_
|
||||
- __network_max_fee_bps__: _number_
|
||||
- __network_max_fee_fixed__: _number_
|
||||
- __noffer__: _string_
|
||||
|
|
|
|||
|
|
@ -456,6 +456,7 @@ type UseInviteLinkRequest struct {
|
|||
type UserInfo struct {
|
||||
Balance int64 `json:"balance"`
|
||||
Max_withdrawable int64 `json:"max_withdrawable"`
|
||||
Ndebit string `json:"ndebit"`
|
||||
Network_max_fee_bps int64 `json:"network_max_fee_bps"`
|
||||
Network_max_fee_fixed int64 `json:"network_max_fee_fixed"`
|
||||
Noffer string `json:"noffer"`
|
||||
|
|
|
|||
|
|
@ -2575,6 +2575,7 @@ export const UseInviteLinkRequestValidate = (o?: UseInviteLinkRequest, opts: Use
|
|||
export type UserInfo = {
|
||||
balance: number
|
||||
max_withdrawable: number
|
||||
ndebit: string
|
||||
network_max_fee_bps: number
|
||||
network_max_fee_fixed: number
|
||||
noffer: string
|
||||
|
|
@ -2587,6 +2588,7 @@ export type UserInfoOptions = OptionsBaseMessage & {
|
|||
checkOptionalsAreSet?: []
|
||||
balance_CustomCheck?: (v: number) => boolean
|
||||
max_withdrawable_CustomCheck?: (v: number) => boolean
|
||||
ndebit_CustomCheck?: (v: string) => boolean
|
||||
network_max_fee_bps_CustomCheck?: (v: number) => boolean
|
||||
network_max_fee_fixed_CustomCheck?: (v: number) => boolean
|
||||
noffer_CustomCheck?: (v: string) => boolean
|
||||
|
|
@ -2604,6 +2606,9 @@ export const UserInfoValidate = (o?: UserInfo, opts: UserInfoOptions = {}, path:
|
|||
if (typeof o.max_withdrawable !== 'number') return new Error(`${path}.max_withdrawable: is not a number`)
|
||||
if (opts.max_withdrawable_CustomCheck && !opts.max_withdrawable_CustomCheck(o.max_withdrawable)) return new Error(`${path}.max_withdrawable: custom check failed`)
|
||||
|
||||
if (typeof o.ndebit !== 'string') return new Error(`${path}.ndebit: is not a string`)
|
||||
if (opts.ndebit_CustomCheck && !opts.ndebit_CustomCheck(o.ndebit)) return new Error(`${path}.ndebit: custom check failed`)
|
||||
|
||||
if (typeof o.network_max_fee_bps !== 'number') return new Error(`${path}.network_max_fee_bps: is not a number`)
|
||||
if (opts.network_max_fee_bps_CustomCheck && !opts.network_max_fee_bps_CustomCheck(o.network_max_fee_bps)) return new Error(`${path}.network_max_fee_bps: custom check failed`)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue