Giter Club home page Giter Club logo

ckb-sdk-js's People

Contributors

alexsupa597 avatar ashchan avatar classicalliu avatar cosinlink avatar dependabot-preview[bot] avatar dependabot-support avatar dependabot[bot] avatar duanyytop avatar happypeter avatar keith-cy avatar louzhixian avatar luckyyang avatar mine77 avatar orangemio avatar painterpuppets avatar qftgtr avatar snyk-bot avatar xwartz avatar yanguoyu avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ckb-sdk-js's Issues

ReferenceError: Can't find variable: BigInt

When I was in safari and ci runtime environment, it will be reported the following error:
ReferenceError: Can't find variable: BigInt

image

This problem also appeared with lower node versions, is there any solution?

相同的tx数据,通过不同的工具进行签名,witnesses不一样

我们分别用 ckb-sdk-js ckb.signTransactionckb studio 进行签名,witnesses数据不一样

交易结构如下:

const rawTx = {
  "version": "0x0",
  "cellDeps": [{
    "depType": "depGroup",
    "outPoint": {
      "txHash": "0xace5ea83c478bb866edf122ff862085789158f5cbff155b7bb5f13058555b708",
      "index": "0x0"
    }
  }, {
    "depType": "code",
    "outPoint": {
      "txHash": "0x9b08d3645320e5915c8682e591f36f951dc14a733bdaa58a5e6ccefdb9c4b5b0",
      "index": "0x0"
    }
  }],
  "headerDeps": [],
  "inputs": [{
    "since": "0x0",
    "previousOutput": {
      "txHash": "0xef7e089ba381ad4eecd64565cc739278032e84baa011d8d559394e5cadd8b898",
      "index": "0x1"
    }
  }, {
    "since": "0x0",
    "previousOutput": {
      "txHash": "0xef7e089ba381ad4eecd64565cc739278032e84baa011d8d559394e5cadd8b898",
      "index": "0x0"
    }
  }],
  "outputs": [{
    "capacity": "0xb0f387b00",
    "lock": {
      "hashType": "data",
      "codeHash": "0x0fb343953ee78c9986b091defb6252154e0bb51044fd2879fde5b27314506111",
      "args": "0xcf0c34ac8af4a2c7861b33640ecc9af4e8d338f1"
    },
    "type": null
  }, {
    "capacity": "0x22ecb25c00",
    "lock": {
      "hashType": "type",
      "codeHash": "0x9bd7e06f3ecf4be0f2fcd2188b23f1b9fcc88e5d4b65a8637b17723bbda3cce8",
      "args": "0xbc76e06a53193d3cb2fd0eb331237cb021fe39ea"
    },
    "type": null
  }],
  "outputsData": ["0x", "0x"],
  "witnesses": [{
    "lock": "",
    "inputType": "",
    "outputType": ""
  }, "0x"]
};

sdk签名数据:

"witnesses":["0x5500000010000000550000005500000041000000e2c1d469d5f0c8011c064a9041dd0d556fdb7d95c5a37e0b2778a6e1b115341b17fa8868c2b4ff0cfee9b4196a23cfee72ac240dbe041740dcf15767e334de4901","0x"]}

通过studio签名数据:

"witnesses": ["0x55000000100000005500000055000000410000004c18a8bc16a6403a5e600e9e23c106382f5cdfe8110733dccb7138979cda7dbc14e7fd2350cfa9f7414eb548094fa62bd5de344fd180bae57aeadfcc145eaf4300", "0x"]

共同使用 ckb.rpc.sendTransaction 发送交易,使用sdk签名的数据提示错误 {"code":-3,"message":"Script: ValidationFailure(-31)"},而studio签名数据能发送成功。

how to send transactions with multi private keys?

I found similar issue #362 before, but can't get the function of "generateTransactionBuilder" anymore, I push each witness from different keys into witnesses, but got an error "InvalidScript(-31)"

the witnesses looks like this "['0x550000001000000055000000550000004100000000xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx','0x550000001000000055000000550000004100000000yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy', '0x', '0x']

a bug in generateRawTransaction which might cause tx failure

https://github.com/nervosnetwork/ckb-sdk-js/blob/491bf1e86b35fb0bc50871bbdccb56ec41bdc44c/packages/ckb-sdk-core/src/generateRawTransaction.ts#L94

Imagin this:

total input capacity =100 CKB
target capacity = 70 CKB
which will leave the change output cell only 30 CKB
Since the minimal cell capacity is 63 CKB, it will cause "Insufficient Cell Capacity" error.

I think the code here should be changed to:

 if (inputCapacity > targetCapacity + targetFee + BigInt(63e8)) { 

Code hash error when attempting to generate full address from private key.

Error: '0x00' is not a valid code hash
    at toAddressPayload (/home/username/testing/node_modules/@nervosnetwork/ckb-sdk-utils/lib/address/index.js:57:15)
    at bech32Address (/home/username/testing/node_modules/@nervosnetwork/ckb-sdk-utils/lib/address/index.js:69:210)
    at pubkeyToAddress (/home/username/testing/node_modules/@nervosnetwork/ckb-sdk-utils/lib/address/index.js:75:38)
    at privateKeyToAddress (/home/username/testing/node_modules/@nervosnetwork/ckb-sdk-utils/lib/index.js:55:84)
    at Object.<anonymous> (/home/username/testing/index.js:5:57)
    at Module._compile (internal/modules/cjs/loader.js:778:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
    at Module.load (internal/modules/cjs/loader.js:653:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
    at Function.Module._load (internal/modules/cjs/loader.js:585:3)

index.ts:

import {AddressPrefix, AddressType, privateKeyToAddress} from '@nervosnetwork/ckb-sdk-utils';

const PRIVATE_KEY = '0xcd708059624d8301382972808b3e504b5ea3d94e210edf229f48cadcb8fe0989';

const address = privateKeyToAddress(PRIVATE_KEY, {prefix: AddressPrefix.Testnet, type: AddressType.FullVersion});

console.log(address);

How to run contents of test.zip:

npm i
npx tsc
nodejs index.js

test.zip

Duplicate transaction error

I am sending ckb using the sendtransaction function of ckb-sdk-js.

However, sending the same amount to the same address within a short period of time will result in a depulicate transaction error. I think that the same transaction should not be made because the previous cell was used. Is there any way to solve this?

For reference, live cells are managed through lumos/indexer.

loadSystemCell fail

latest version
example code

(node:24816) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'replace' of undefined
    at Core.<anonymous> (/home/hunjixin/project/node_modules/@nervosnetwork/ckb-sdk-core/lib/index.js:59:54)
    at Generator.next (<anonymous>)
    at fulfilled (/home/hunjixin/project/node_modules/@nervosnetwork/ckb-sdk-core/lib/index.js:4:58)
    at processTicksAndRejections (internal/process/task_queues.js:85:5)

npx tsc error

I run npx tsc in docker (FROM node:12.12.0) and gave the following error:

Step 9/11 : RUN npx tsc
 ---> Running in faa6b0c40395
node_modules/@nervosnetwork/ckb-sdk-rpc/lib/index.d.ts(2,23): error TS2688: Cannot find type definition file for './types/ckb_rpc'.
node_modules/@nervosnetwork/ckb-sdk-rpc/lib/index.d.ts(13,53): error TS2503: Cannot find namespace 'CKB_RPC'.
node_modules/@nervosnetwork/ckb-sdk-rpc/lib/index.d.ts(14,66): error TS2503: Cannot find namespace 'CKB_RPC'.
node_modules/@nervosnetwork/ckb-sdk-rpc/lib/index.d.ts(15,54): error TS2503: Cannot find namespace 'CKB_RPC'.
node_modules/@nervosnetwork/ckb-sdk-rpc/lib/index.d.ts(16,57): error TS2503: Cannot find namespace 'CKB_RPC'.
node_modules/@nervosnetwork/ckb-sdk-rpc/lib/index.d.ts(18,56): error TS2503: Cannot find namespace 'CKB_RPC'.
node_modules/@nervosnetwork/ckb-sdk-rpc/lib/index.d.ts(19,74): error TS2503: Cannot find namespace 'CKB_RPC'.
node_modules/@nervosnetwork/ckb-sdk-rpc/lib/index.d.ts(27,28): error TS2503: Cannot find namespace 'CKB_RPC'.
node_modules/@nervosnetwork/ckb-sdk-rpc/lib/index.d.ts(28,28): error TS2503: Cannot find namespace 'CKB_RPC'.
node_modules/@nervosnetwork/ckb-sdk-rpc/lib/index.d.ts(29,26): error TS2503: Cannot find namespace 'CKB_RPC'.
node_modules/@nervosnetwork/ckb-sdk-rpc/lib/index.d.ts(30,28): error TS2503: Cannot find namespace 'CKB_RPC'.
node_modules/@nervosnetwork/ckb-sdk-rpc/lib/index.d.ts(31,32): error TS2503: Cannot find namespace 'CKB_RPC'.
node_modules/@nervosnetwork/ckb-sdk-rpc/lib/index.d.ts(32,27): error TS2503: Cannot find namespace 'CKB_RPC'.
node_modules/@nervosnetwork/ckb-sdk-rpc/lib/index.d.ts(33,30): error TS2503: Cannot find namespace 'CKB_RPC'.
node_modules/@nervosnetwork/ckb-sdk-rpc/lib/index.d.ts(34,29): error TS2503: Cannot find namespace 'CKB_RPC'.
node_modules/@nervosnetwork/ckb-sdk-rpc/lib/index.d.ts(35,36): error TS2503: Cannot find namespace 'CKB_RPC'.
node_modules/@nervosnetwork/ckb-sdk-rpc/lib/index.d.ts(36,26): error TS2503: Cannot find namespace 'CKB_RPC'.
node_modules/@nervosnetwork/ckb-sdk-rpc/lib/index.d.ts(37,40): error TS2503: Cannot find namespace 'CKB_RPC'.
node_modules/@nervosnetwork/ckb-sdk-rpc/lib/index.d.ts(38,34): error TS2503: Cannot find namespace 'CKB_RPC'.
node_modules/@nervosnetwork/ckb-sdk-rpc/lib/index.d.ts(39,28): error TS2503: Cannot find namespace 'CKB_RPC'.
node_modules/@nervosnetwork/ckb-sdk-rpc/lib/index.d.ts(40,30): error TS2503: Cannot find namespace 'CKB_RPC'.
node_modules/@nervosnetwork/ckb-sdk-rpc/lib/index.d.ts(41,26): error TS2503: Cannot find namespace 'CKB_RPC'.
node_modules/@nervosnetwork/ckb-sdk-rpc/lib/index.d.ts(42,31): error TS2503: Cannot find namespace 'CKB_RPC'.
node_modules/@nervosnetwork/ckb-sdk-rpc/lib/index.d.ts(43,24): error TS2503: Cannot find namespace 'CKB_RPC'.
node_modules/@nervosnetwork/ckb-sdk-rpc/lib/index.d.ts(44,32): error TS2503: Cannot find namespace 'CKB_RPC'.
node_modules/@nervosnetwork/ckb-sdk-rpc/lib/index.d.ts(46,19): error TS2503: Cannot find namespace 'CKB_RPC'.
node_modules/@nervosnetwork/ckb-sdk-rpc/lib/index.d.ts(52,26): error TS2503: Cannot find namespace 'CKB_RPC'.
node_modules/@nervosnetwork/ckb-sdk-rpc/lib/index.d.ts(53,41): error TS2503: Cannot find namespace 'CKB_RPC'.
node_modules/@nervosnetwork/ckb-sdk-rpc/lib/index.d.ts(59,43): error TS2503: Cannot find namespace 'CKB_RPC'.
node_modules/@nervosnetwork/ckb-sdk-rpc/lib/index.d.ts(60,49): error TS2503: Cannot find namespace 'CKB_RPC'.
node_modules/@nervosnetwork/ckb-sdk-rpc/lib/index.d.ts(67,26): error TS2503: Cannot find namespace 'CKB_RPC'.
node_modules/@nervosnetwork/ckb-sdk-rpc/lib/index.d.ts(68,48): error TS2503: Cannot find namespace 'CKB_RPC'.
node_modules/@nervosnetwork/ckb-sdk-rpc/lib/index.d.ts(69,50): error TS2503: Cannot find namespace 'CKB_RPC'.
node_modules/@nervosnetwork/ckb-sdk-rpc/lib/index.d.ts(70,40): error TS2503: Cannot find namespace 'CKB_RPC'.
node_modules/@nervosnetwork/ckb-sdk-rpc/lib/index.d.ts(71,39): error TS2503: Cannot find namespace 'CKB_RPC'.
node_modules/@nervosnetwork/ckb-sdk-rpc/lib/index.d.ts(72,41): error TS2503: Cannot find namespace 'CKB_RPC'.
node_modules/@nervosnetwork/ckb-sdk-rpc/lib/index.d.ts(73,42): error TS2503: Cannot find namespace 'CKB_RPC'.
node_modules/@nervosnetwork/ckb-sdk-rpc/lib/index.d.ts(74,46): error TS2503: Cannot find namespace 'CKB_RPC'.
node_modules/@nervosnetwork/ckb-sdk-rpc/lib/index.d.ts(75,52): error TS2503: Cannot find namespace 'CKB_RPC'.
The command '/bin/sh -c npx tsc' returned a non-zero code: 2
...

This problem does not appear on my Apple computer.I suspect that it is the case of the folder name in sdk, please see the figure below:
image

Dao related problems, please help me to have a look

The call to deposit is successful, and the call to starwithdrawing is also successful, but the call to withdraw reports an error. What is the reason for the error? don't quite understand
This is my address: ckt1qyqw8c9g9vvemn4dk40zy0rwfw89z82h6fys07ens3

const depositOutPoint = {
  txHash: "0x201b4e60ee79934170cadc8e296e9d685c49f2b497e964417d754b88e051e2b1",
  index: "0x0"
};
const startWithDrawOutPoint = {
  txHash: "0xd5271ca8302f155bdcc69e60e967aa9eb709eb8f559f46a8b79613955626bbcf",
  index: "0x0"
};
const withdraw = async () => {
  await ckb.loadDeps();
  await loadCells();
  const tx = await ckb.generateDaoWithdrawTransaction({
    depositOutPoint,
    withdrawOutPoint: startWithDrawOutPoint,
    fee: BigInt(1000000)
  });
  console.log(tx, "tx_________");
  const signed = ckb.signTransaction(sk)(tx);
  console.log(signed, "signed______");

  const txHash = await ckb.rpc.sendTransaction(signed);
  console.log(txHash, "txHash______");
  const outPoint = {
    txHash,
    index: "0x0"
  };
  console.log(`const withdrawOutPoint = ${JSON.stringify(outPoint, null, 2)}`);
};

image
image

The balance is sufficient but cannot be transferred

I used an unspent cell to transfer 3424540000 capacity, but the RPC returned Error: {"code":-3,"message":"Transaction(InsufficientCellCapacity)"}.

The picture below is my transfer capacity (0xcc1e5560 - 3424540000):
image

Below is the available cell I queried using loadCells(0x8bb2c97000 - 600000000000):
image

This is RPC respoonse result:
image

Blake160 in C

I am applying blake2b algorithm in c and removing last 12 bytes. But my output in c is not matching with this.

it('blake160', () => {
const fixture = {
message: '024a501efd328e062c8675f2365970728c859c592beeefd6be8ead3d901330bc01',
digest: '36c329ed630d6ce750712a477543672adab57f4c',
}
const digest = blake160(new Uint8Array(Buffer.from(fixture.message, 'hex')), 'hex')
expect(digest).toBe(fixture.digest)
})

How to send tx in production or get balance?

It's example with loadCells method, but with warning: "This method is only for demo, don't use it in production"
How to create and send tx in production? Or get balance for account?

I can transfer money on the testnet, but I get an error when I switch to the mainnet

Hello, I can use this transfer successfully in the test environment, but when I switch to the main network, an error will be reported. I deleted the private key and need to replace it with yours. The rawTransaction configuration address should also be replaced with your own, please help ,thanks

image

export const bootstrap = async () => {
  const privateKey = "" // example private key

  const ckb = new CKB("https://mainnet.ckb.dev") // instantiate the JS SDK with provided node url

  await ckb.loadDeps() // load the dependencies of secp256k1 algorithm which is used to verify the signature in transaction's witnesses.

  const publicKey = ckb.utils.privateKeyToPublicKey(privateKey)
  /**
   * to see the public key
   */
  // console.log(`Public key: ${publicKey}`)

  const publicKeyHash = `0x${ckb.utils.blake160(publicKey, 'hex')}`
  /**
   * to see the public key hash
   */
  console.log(`Public key hash: ${publicKeyHash}`)

  const addresses = {
    mainnetAddress: ckb.utils.pubkeyToAddress(publicKey, {
      prefix: ckb.utils.AddressPrefix.Mainnet
    }),
    testnetAddress: ckb.utils.pubkeyToAddress(publicKey, {
      prefix: ckb.utils.AddressPrefix.Testnet
    })
  }

  console.log(ckb.config,"ckb.config______")

  /**
   * to see the addresses
   */
  // console.log(JSON.stringify(addresses, null, 2))

  // return


  if (!ckb.config.secp256k1Dep) return
  

  const lock = {
    codeHash: ckb.config.secp256k1Dep.codeHash,
    hashType: ckb.config.secp256k1Dep.hashType,
    args: publicKeyHash
  }



  // console.log(lock,"lock_____")
  /**
   * load cells from lumos as `examples/sendTransactionWithLumosCollector.js` shows
   */
  const unspentCells = await ckb.loadCells({ indexer, CellCollector, lock })

  /**
   * to see the unspent cells
   */
  console.log(unspentCells,"unspentCells____")

  /**
   * send transaction
   */
  const toAddress = ckb.utils.privateKeyToAddress("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff", {
    prefix: ckb.utils.AddressPrefix.Testnet
  })

  /**
   * @param fee - transaction fee, can be set in number directly, or use an reconciler to set by SDK
   *                               say, fee: BigInt(100000) means transaction fee is 100000 shannons
   *                                or, fee: { feeRate: '0x7d0', reconciler: ckb.utils.reconcilers.extraInputs } to set transaction fee by reconcilers.extraInputs with feeRate = 2000 shannons/Byte
   *
   * @external https://docs.nervos.org/docs/essays/faq#how-do-you-calculate-transaction-fee
   */
  const rawTransaction = await ckb.generateRawTransaction({
    fromAddress: "ckb1qyq9suqw8dlmfe9zfhpeapceypr3mmjax3mse7sf39",
    toAddress:"ckb1qyqtjfdvsmlksux7zw69zk54krjt46gkf3eqr0zw7x",
    capacity: BigInt(6200000000),
    fee: BigInt(100000),
    safeMode: true,
    cells: unspentCells,
    deps: ckb.config.secp256k1Dep,
  })

  console.log(rawTransaction,"rawTransaction____")


  const signedTx = ckb.signTransaction(privateKey)(rawTransaction)
  /**
   * to see the signed transaction
   */
  console.log(JSON.stringify(signedTx, null, 2))

  const realTxHash = await ckb.rpc.sendTransaction(signedTx)
  /**
   * to see the real transaction hash
   */
  console.log(`The real transaction hash is: ${realTxHash}`)
}

address module not working

How To Reproduce

  1. setup a new node project
mkdir peter_test&&cd peter_test
npm init
  1. install package
yarn add @nervosnetwork/ckb-sdk-address
  1. save code in index.js
const Address = require('@nervosnetwork/ckb-sdk-address')

const privateKey =
  '7ee543efa447260ecda666296fa64f67c0482e6371e69b3a9cd8ae6ac7646bdf'

const address = new Address(privateKey)
console.log(address)
  1. run
node index.js

Expected

to see the address in console output

Actually Saw

➜  peter-test node index.js 
/Users/peter/Desktop/nervos/ckb-mining/peter-test/index.js:6
const address = new Address(privateKey)
                ^

TypeError: Address is not a constructor

jsonScriptToTypeHash doubt

I use ckb-sdk-js to generate ckb address.
Use it like this:
image

The privateKey is different every time, but the address always is
2c77e61b5ef14aa2d8b9f54cb53247df69383b7bbffa8ac10797b95bcc0fbf66.

This is what @cezres once archived, it work well.

image

Can you point out my mistake ? @Keith-CY

merkle_tree

I found that the implementation of nervous merkle tree is unique. I cannot find the same third-party library's JavaScript implementation. Can you provide this method in this repository?Thank you.

GenerateRawTransaction should be generic

Generate Raw Transaction in sdk only accommodates send capacity use case. It should allow for generating different types of transactions. If we want to have a built in transfer capacity method, this method should then use the generate raw transaction.

0.36.0 doesn't compile with typescript 4.0.3

In a typescript 4.0.3 project, as soon as I add @nervosnetwork/ckb-sdk-core": "^0.36.0" to my package.json I get when I try to compile the project:

node_modules/@nervosnetwork/ckb-sdk-core/types/global.d.ts:58:13 - error TS2430: Interface 'Output' incorrectly extends interface 'CellOutput'.
  Types of property 'capacity' are incompatible.
    Type 'string | bigint' is not assignable to type 'string'.
      Type 'bigint' is not assignable to type 'string'.

58   interface Output extends CKBComponents.CellOutput {
               ~~~~~~

Any way to fix this before 0.37.0?

It's quite annoying as it forces me to turn on skipLibCheck for the whole project.

Question about calling `generateRawTransaction` function raise `InsufficientCellCapacity` error

I see the generateRawTransaction function with the safeMode parameter. This parameter controls the use of unspent, but because there is a problem that the remaining spent cannot be less than 61CKB, the problem is that the balance is sufficient, but the transfer fails. Is the code of the link below, Can be changed to if (inputCapacity >= costCapacity + 61) { ?

https://github.com/nervosnetwork/ckb-sdk-js/blob/969a6c5b1807842876f7a90414683d143697ffb0/packages/ckb-sdk-core/src/generateRawTransaction.ts#L86

Some problems with sdk

1. After I run yarn add @nervosnetwork/ckb-sdk-core, I can't find the folder in the local node_modules:

  • node_modules/@nervosnetwork/ckb-sdk-core/lib/types -> https://github.com/nervosnetwork/ckb-sdk-js/tree/develop/packages/ckb-sdk -core/types

  • node_modules/@nervosnetwork/ckb-sdk-rpc/lib/types/CKB_RPC -> https://github.com/nervosnetwork/ckb-sdk-js/tree/develop/packages/ckb-sdk-rpc/types/CKB_RPC

  • node_modules/@nervosnetwork/ckb-sdk-utils/lib/types/blake2b-wasm -> https://github.com/nervosnetwork/ckb-sdk-js/tree/develop/packages/ckb-sdk-utils/types/blake2b-wasm

Should be missing these folders and files when packaging.

2. My project can be successfully built in the macOS catalina, but fails on docker node:12.12.0.

After my debug, the reason for the guess is that the problem of the folder "node_modules/@nervosnetwork/ckb-sdk-rpc/lib/types/CKB_RPC` is uppercase. After changing to lowercase, my project can be built success.

The second question is consistent with #371 .

Unable to get sender via get_transaction rpc

I call RPC get_transaction to get the details of 0x32a6d5be08261efc63ccaa31503fe065cc28ee21b976883f694d062570954e6f and get the result:

{
  "jsonrpc": "2.0",
  "result": {
    "transaction": {
      "cell_deps": [
        {
          "dep_type": "dep_group",
          "out_point": {
            "index": "0x0",
            "tx_hash": "0xe02c8a20a64a336cac1e477b9847888251a30a9bfe2d9050ca7ab59f507b15c7"
          }
        }
      ],
      "hash": "0x32a6d5be08261efc63ccaa31503fe065cc28ee21b976883f694d062570954e6f",
      "header_deps": [],
      "inputs": [
        {
          "previous_output": {
            "index": "0x0",
            "tx_hash": "0x7d8bbb5638926ca86d6f318679c014d31bd3eaea474d1a264e863f1867d2cd69"
          },
          "since": "0x0"
        }
      ],
      "outputs": [
        {
          "capacity": "0x19b45a500",
          "lock": {
            "args": "0xa43856a2fcef41be40170cb473500cc7b30a4dbf",
            "code_hash": "0x9bd7e06f3ecf4be0f2fcd2188b23f1b9fcc88e5d4b65a8637b17723bbda3cce8",
            "hash_type": "type"
          },
          "type": null
        }
      ],
      "outputs_data": [
        "0x"
      ],
      "version": "0x0",
      "witnesses": [
        "0x901f842a476383a52e97dcf68a1f56ef9e5f9f30cd1d871b42aeccb6246a5fee22b9a466bab13c8334698288ec8edee10cfe78851cfd1ae8094794108426e33200"
      ]
    },
    "tx_status": {
      "block_hash": "0x7a7f7296b6922225d4ca35798301139c227b8a8f35033367e89c251317cba91f",
      "status": "committed"
    }
  },
  "id": 1
}

How do I know the sender's address through the results?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.