Variable NativeBridgeMethodsConst

NativeBridgeMethods: {
    generateOperation(privateKey: string, publicKey: string, originChainType: "EVM" | "SOLANA", originChain:
        | "base"
        | "eth"
        | "SOLANA"
        | "polygon"
        | "bsc"
        | "arbitrum"
        | "optimism"
        | "avalanche", destinationChainType: "EVM" | "SOLANA", destinationChain:
        | "base"
        | "eth"
        | "SOLANA"
        | "polygon"
        | "bsc"
        | "arbitrum"
        | "optimism"
        | "avalanche", originAddress: string, destinationAddress: string, amount: string, token: "USDC"): RPCRequest;
    generateOperationTx(compiled: NativeBridgeOperationCompiled): Transaction;
    validateChain(chain: string, chainType: string, isOrigin: boolean): void;
} = ...

Type declaration

  • generateOperation:function
    • Generates a new operation, ready to be sent to the node as a RPCRequest TODO Implement the params REVIEW Should we use the identity somehow or we keep using the private key?

      Parameters

      • privateKey: string
      • publicKey: string
      • originChainType: "EVM" | "SOLANA"
      • originChain:
            | "base"
            | "eth"
            | "SOLANA"
            | "polygon"
            | "bsc"
            | "arbitrum"
            | "optimism"
            | "avalanche"
      • destinationChainType: "EVM" | "SOLANA"
      • destinationChain:
            | "base"
            | "eth"
            | "SOLANA"
            | "polygon"
            | "bsc"
            | "arbitrum"
            | "optimism"
            | "avalanche"
      • originAddress: string
      • destinationAddress: string
      • amount: string
      • token: "USDC"

      Returns RPCRequest

  • generateOperationTx:function
  • validateChain:function
    • Validates the chain

      Parameters

      • chain: string
      • chainType: string
      • isOrigin: boolean

        (useful for error messages)

      Returns void