🚧API Reference
!This page is under maintenance
Enable connection
In order to allow a website to read user account information and prepare transaction is necessary call to enable method. This will create a popup asking for user authorization, in case the extension is locked, it will open the unlock popup in first instance.
window.vectis.cosmos.enable(chainIds: string | string[]): Promise<void>;Note: it will expose the account selected in account section.
Get account information
After an user give permission for reading account information, calling to getKey method will return the account information.
window.vectis.cosmos.getKey(chainId: string): Promise<Key>interface Key {
algo: Algo;
name: string;
pubKey: Uint8Array // Vectis accounts use controller pub key
address: string;
isNanoLedger: boolean;
isVectisAccount: boolean;
}Note: In case of calling getKey before enable, it will follow enable flow before getKey.
Sign Amino
This methods allow to sign transaction with amino encoding.
Note: It's necessary to enable a connection, before using this method.
Sign Direct
This methods allow to sign transaction with protobuf encoding.
Get Signer
In this field we could find different kind of signer and we are explain the difference among them. As we saw previously there are different kind of encoding, there are direct or amino, so depending on what method is used will be possible to sign one kind of txs or another.
Get Accounts
When any of these methods are invoked, they return an object structure with two or three properties. All of them has one property in common which is getAccounts.
Amino Signer
Note: This signer only can sign amino encoding txs.
Direct Signer
Note: This signer only can sign protobuf encoding txs.
Amino & Direct Signer
Note: This signer return three properties: signDirect, signAmino and getAccounts. Allowing to dApp or third party libraries select their preference in the signature.
Auto Signer
This method is a little bit different to the others because before to return a signer, the method evaluate what should return base on some internals parameters.
SignArbitrary
This method is usually use for sign a message to prove ownership of an account.
VerifyArbitrary
This method is used to verify a message signed with sign arbitrary, the signature result from signArbitrary method should provided as last parameter.
Get supported chains
Add custom chains
Note: You can find chain interface in the page below.
Last updated