Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[OmniBridge] Implement essential Bridge SDK JS library #1

Open
karim-en opened this issue Dec 2, 2024 · 1 comment
Open

[OmniBridge] Implement essential Bridge SDK JS library #1

karim-en opened this issue Dec 2, 2024 · 1 comment
Assignees

Comments

@karim-en
Copy link
Collaborator

karim-en commented Dec 2, 2024

We need to implement essential bridge SDK in Typescript; the library should include basic functions to be able to create and track transfers.

This is just a nominal description of the, it is subject to change during the development if needed.

interface TransferMessage {
  tokenAddress: OmniAddress,
  amount: BigNumber,
  fee: BigNumber,
  nativeFee: BigNumber,
  recipient: OmniAddress,
  message: string | null
}

interface OmniTransfer {
  txId: string,
  nonce: BigNumber,
  transferMessage: TransferMessage
}

function omniTransfer(
  wallet: ethers.Wallet | NearWalletConnection | solWalletAdapter, 
  transferMessage: TransferMessage
): Promise<OmniTransfer>;

function findOmniTransfers(sender: OmniAddress): Promise<OmniTransfer[]>; 
function getFee(sender: OmniAddress, recipient: OmniAddress): Promise<Fee>;
function getTransferStatus(originChain: ChainKind, nonce: BigNumber): Promise<Status>;

function initDeployToken(tokenAddress: OmniAddress, destinationChain: ChainKind): Promise;
function finDeployToken(txId: OmniTranscationId): Promise;
function bindToken(txId: OmniTranscationId): Promise;

Notes:

@kiseln kiseln self-assigned this Jan 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants