Skip to content

CatMask-Wallet/near-wallet

Repository files navigation

CatMask Wallet project

Add Catmask to browser

Import crx

Catmask.crx

google

Catmask

Developer documentation

Demo

Demo Live

Install

src

https://raw.githubusercontent.com/CatMask-Wallet/near-wallet/main/public/web.js

npm

TODO

get accoudId

catMask.getAccoutId(e => {
    console.log(e) // accoundID
})

sign Message

catMask.signMessage('you messageText..', (e)=>{
   console.log(e) // {publicKey: '', signature: 'base64'}
})

sign Transaction

catMask.signTransaction(new Uint8Array([2, 88]).toString() /*transaction hash*/, (e)=>{
   console.log(e) // {publicKey: '', signature: Uint8Array.toString()}
})

sign TransactionAndSendRaw

  • transaction and send
catMask.signTransactionAndSendRaw({
    contractId: 'wrap.testnet',
    actions: [
        // FunctionCall
        {
          methodName: 'near_deposit2',
          args: {},
          gas: '10000000000000',
          deposit: '1000000000000000000000000',
        },
        // transfer
        {
            deposit: '1000000000000000000000000'
        },
        // stake
        {
            stake: '1000000000000000000000000',
            publicKey: ''
        }
      ],
}, (e) => {
    // {hash: '', res: {}}
    console.log(e)
})