Skip to content

Instantly share code, notes, and snippets.

@earthflower
Created October 19, 2021 07:24
Show Gist options
  • Save earthflower/9b4da34c0dac496915c14561128a99cb to your computer and use it in GitHub Desktop.
Save earthflower/9b4da34c0dac496915c14561128a99cb to your computer and use it in GitHub Desktop.
dapp_stubs
ethereum.isConnected
earth.isConnected([‘eth’])
earth.isConnected([‘icp’,‘eth’]);
{connected: true,
connectedSymbol: ‘icp
connectedAddress: ‘xyz’,
connectedOn: new Date()}
Earth,connect
earth.disconnect
earth.sign(‘address’, optionsObj}
optionsObj = {symbol: ‘icp’, canniserId: ‘xyzzy-‘, canisterMethod: ‘ss’, canniserFunc: () => true }
earth.bulkSign
@earthflower
Copy link
Author

For Send transaction from Dapp

  1. const LEDGER_CANISTER_ID = 'ryjl3-tyaaa-aaaaa-aaaba-cai';
  2. candid.did.ts for canister
  3. Method among candid, did,ts example - send_dfx
  4. Args for method - incase of send_dfx to, fee, memo, from_subaccount, created_at_time, amount

@earthflower
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment