0.0.3 • Published 3 years ago
capacitor-esus-plugin v0.0.3
capacitor-esus-plugin
All core / native functions needed for working with the Esus Transaction Protocol on smartphone.
Install
npm install capacitor-esus-plugin
npx cap sync
API
generateUserKeys()
setConnectionCertificate(...)
getConnectionCertificate()
transactionInit(...)
transactionSign(...)
transactionSignTemp(...)
transactionCheckByMerchant(...)
getSalt()
get(...)
set(...)
remove(...)
clear()
generateUserKeys()
generateUserKeys() => Promise<{ csr: string; signatureKey: string; transactionKey: string; hmacKey: string; }>
Returns: Promise<{ csr: string; signatureKey: string; transactionKey: string; hmacKey: string; }>
setConnectionCertificate(...)
setConnectionCertificate(options: { certificate: string; }) => Promise<{ value: boolean; }>
Param | Type |
---|---|
options | { certificate: string; } |
Returns: Promise<{ value: boolean; }>
getConnectionCertificate()
getConnectionCertificate() => Promise<{ value: string; }>
Returns: Promise<{ value: string; }>
transactionInit(...)
transactionInit(options: { amount: number; merchantId: string; }) => Promise<{ value: string; }>
Param | Type |
---|---|
options | { amount: number; merchantId: string; } |
Returns: Promise<{ value: string; }>
transactionSign(...)
transactionSign(options: { merchantId: string; amount: number; transactionKey: string; }) => Promise<{ encryptedVector: string; message: string; encryptedWallet: string; salt: number; }>
Param | Type |
---|---|
options | { merchantId: string; amount: number; transactionKey: string; } |
Returns: Promise<{ encryptedVector: string; message: string; encryptedWallet: string; salt: number; }>
transactionSignTemp(...)
transactionSignTemp(options: { message: string; }) => Promise<{ signature: string; }>
Param | Type |
---|---|
options | { message: string; } |
Returns: Promise<{ signature: string; }>
transactionCheckByMerchant(...)
transactionCheckByMerchant(options: { vector: string; encryptedVector: string; transactionKey: string; salt: number; }) => Promise<{ value: boolean; }>
Param | Type |
---|---|
options | { vector: string; encryptedVector: string; transactionKey: string; salt: number; } |
Returns: Promise<{ value: boolean; }>
getSalt()
getSalt() => Promise<{ value: number; }>
Returns: Promise<{ value: number; }>
get(...)
get(options: { key: string; }) => Promise<{ value: string; }>
Param | Type |
---|---|
options | { key: string; } |
Returns: Promise<{ value: string; }>
set(...)
set(options: { key: string; value: string; }) => Promise<{ value: boolean; }>
Param | Type |
---|---|
options | { key: string; value: string; } |
Returns: Promise<{ value: boolean; }>
remove(...)
remove(options: { key: string; }) => Promise<{ value: boolean; }>
Param | Type |
---|---|
options | { key: string; } |
Returns: Promise<{ value: boolean; }>
clear()
clear() => Promise<{ value: boolean; }>
Returns: Promise<{ value: boolean; }>