Closed dmitryrn closed 5 years ago
The type in the .d.ts / .ts file is missing the param. In addition to the APIOptions
, the RippleAPI constructor also accepts ConnectionOptions
:
export interface ConnectionOptions {
trace?: boolean,
proxy?: string
proxyAuthorization?: string
authorization?: string
trustedCertificates?: string[]
key?: string
passphrase?: string
certificate?: string
timeout?: number
}
https://github.com/ripple/ripple-lib/blob/develop/src/common/connection.ts#L10
It should work if you set the "authorization" param. If using TypeScript, it may give you an error; I think you can work around that with type assertion: as APIOptions
. I will look at fixing the type. Thanks for opening this issue!
As I can see in docs https://github.com/ripple/ripple-lib/blob/develop/docs/index.md#parameters there is "authorization" param exist, but in source neither in .d.ts nor in .ts I can not see "authorization" param. Are docs outdated https://github.com/ripple/ripple-lib/blob/develop/src/api.ts#L76?
Can I use user:password auth with ws_public somehow?