@ragsters/raggie-wallet-connector
Version:
This is a React component built by the CryptoRaggies team to enable any React website to easily connect to popular Cardano wallets. The user's choice of wallet is persisted to local storage and the wallet connector will automatically reconnect the previou
43 lines (41 loc) • 1.53 kB
TypeScript
import { Cip30Api } from '../types';
import { TransactionUnspentOutput, Value } from '@emurgo/cardano-serialization-lib-browser';
export declare let raggiepurrse: {
api: {
name: string;
apiVersion: string;
icon: string;
enable: () => Cip30Api | undefined;
isEnabled: () => boolean;
};
};
export declare class Purrse {
getUsedAddresses: () => Promise<string[]>;
getBalance: () => Promise<string>;
getUtxos: () => Promise<string[]>;
submitTx: (tx: string) => Promise<string>;
getNetworkId: () => string;
constructor();
}
type Asset = {
[key: string]: string;
};
export declare const assetsToValue: (assets: Asset[]) => Promise<Value>;
export declare const valueToAssets: (value: Value) => Promise<({
unit: string;
quantity: string;
policy?: undefined;
name?: undefined;
} | {
unit: string;
quantity: string;
policy: string;
name: string;
})[]>;
export declare const utxoFromJson: (output: any, address: any) => Promise<TransactionUnspentOutput>;
export declare function purrseApi(): Promise<Cip30Api>;
export declare function wsSend(handshake: string, address: string, message: string | {}): void;
export declare function prewitness(wallet: string, walletClient: any, transactionBytes: string): Promise<string>;
export declare function signdataprewitness(wallet: string, walletClient: any, address: string, payload: string): Promise<unknown>;
export declare const pingpurrse: (address: string) => Promise<unknown>;
export {};