New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@statechannels/nitro-protocol

Package Overview
Dependencies
Maintainers
5
Versions
161
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@statechannels/nitro-protocol - npm Package Compare versions

Comparing version 2.0.0-alpha.1 to 2.0.0-alpha.2

4

dist/artifacts/contracts/VirtualPaymentApp.sol/VirtualPaymentApp.json

@@ -203,6 +203,6 @@ {

],
"bytecode": "0x608080604052346100165761123c908161001c8239f35b600080fdfe60c0604052600436101561001257600080fd5b6000803560e01c63438b01721461002857600080fd5b346100e7577ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc6060813601126100e35760043567ffffffffffffffff918282116100df5760a08183360301126100df57602435918383116100d757366023840112156100d7578260040135918483116100db573660248460051b860101116100db576044359485116100db5760409085360301126100d75760246100d494600401930190600401610569565b80f35b8480fd5b8580fd5b8380fd5b5080fd5b80fd5b9035907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe18136030182121561013e570180359067ffffffffffffffff821161013e57602001918160051b3603831361013e57565b600080fd5b9035907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff818136030182121561013e570190565b3565ffffffffffff8116810361013e5790565b90156101c2578035907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc18136030182121561013e570190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6080810190811067ffffffffffffffff82111761020d57604052565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6040810190811067ffffffffffffffff82111761020d57604052565b6060810190811067ffffffffffffffff82111761020d57604052565b90601f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0910116810190811067ffffffffffffffff82111761020d57604052565b67ffffffffffffffff811161020d5760051b60200190565b359073ffffffffffffffffffffffffffffffffffffffff8216820361013e57565b92919267ffffffffffffffff821161020d576040519161033660207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f8401160184610274565b82948184528183011161013e578281602093846000960137010152565b9080601f8301121561013e5781602061036e933591016102ee565b90565b909291926080938452610383816102b5565b9060409061039382519384610274565b8295818452602060a0948186520192600592831b8601958251871161013e5780945b8786106103c6575050505050505050565b67ffffffffffffffff863581811161013e57830190606080838851031261013e5785519281840184811084821117610528578752610403816102cd565b84528a5181013583811161013e57885161041e918301610353565b8b51850152868101359083821161013e5701908751601f8301121561013e57813590610449826102b5565b9361045689519586610274565b8285528c519384808701948d1b820101948b51861161013e5781015b8581106104925750505050505084820152815286510194865101946103b5565b803583811161013e578201948c7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe087825103011261013e578f958c51906104d8826101f1565b875181013582528d81013588518301528681013560ff8116810361013e57828f0152808f013586811161013e578f916105179251918a51910101610353565b868201528152855101945101610472565b602460007f4e487b710000000000000000000000000000000000000000000000000000000081526041600452fd5b359065ffffffffffff8216820361013e57565b9092918015610ff657600181146105d85760646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f6261642070726f6f66206c656e677468000000000000000000000000000000006044820152fd5b6105e28185610189565b60208301906105f182856100ea565b91905060408136031261013e5760405161060a8161023c565b813567ffffffffffffffff811161013e5782019060808236031261013e5760405191610635836101f1565b803567ffffffffffffffff811161013e57810136601f8201121561013e57610664903690602081359101610371565b8352602081013567ffffffffffffffff811161013e576106879036908301610353565b6020840152606061069a60408301610556565b9160408501928352013592831515840361013e57602065ffffffffffff93826001966060849501528152019401358452511603610f98576106dd60ff91516111b6565b1603610f3a57600265ffffffffffff61070160406106fb8880610143565b01610176565b1603610edc57600180602086013560021c1603610e7e576107228480610143565b6020810135907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe18136030182121561013e570180359067ffffffffffffffff821161013e57602001813603811361013e5761077e9136916102ee565b9260a08136031261013e576040519160a0830183811067ffffffffffffffff82111761020d57604052813583523567ffffffffffffffff811161013e5736601f82840101121561013e57808201356107d5816102b5565b916107e36040519384610274565b81835260208301903660208460051b83880101011161013e5790602082860101915b60208460051b82880101018310610e6357505050506020830152604081013567ffffffffffffffff8116810361013e5761085891608091604085015261084d606082016102cd565b606085015201610556565b6080820152828051810103926080841261013e5760607fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe06040519561089c8761023c565b60208401518752011261013e57604051906060820182811067ffffffffffffffff82111761020d5760405260408101519060ff8216820361013e576080918352606081015160208401520151604082015260208401528051602082015167ffffffffffffffff60408401511673ffffffffffffffffffffffffffffffffffffffff60608501511665ffffffffffff608086015116916040519460c0860190602087015260a060408701528451809152602060e0870195019060005b818110610e37575050508460009460809482946109aa94606060209a01528684015260a0830152037fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08101835282610274565b8381519101208651604051908582019283526040820152604081526109ce81610258565b5190208387015190604051858101917f19457468657265756d205369676e6564204d6573736167653a0a3332000000008352603c820152603c8152610a1281610258565b5190209060ff8151169060408682015191015191604051938452868401526040830152606082015282805260015afa15610e2b5773ffffffffffffffffffffffffffffffffffffffff60005116908115610dcd57610a88602073ffffffffffffffffffffffffffffffffffffffff9201516111a9565b511603610d6f57610acc610ac2610ab9610ab3610aad610ab395610ad4975199610189565b80610143565b806100ea565b93909580610143565b9490923691610371565b923691610371565b90600181511480610d64575b80610d3c575b80610d14575b15610cb6576020610b096040610b01846111a9565b5101516111a9565b5101518311610c58576020610b336040610b0183610b2a83610b01896111a9565b510151946111a9565b51015190838203918211610c295703610bcb57610b516040916111a9565b5101518051600110156101c257604001516020015103610b6d57565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601a60248201527f426f62206e6f742061646a757374656420636f72726563746c790000000000006044820152fd5b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601c60248201527f416c696365206e6f742061646a757374656420636f72726563746c79000000006044820152fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600960248201527f756e646572666c6f7700000000000000000000000000000000000000000000006044820152fd5b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f6f6e6c79206e617469766520617373657420616c6c6f776564000000000000006044820152fd5b5073ffffffffffffffffffffffffffffffffffffffff610d33836111a9565b51511615610aec565b5073ffffffffffffffffffffffffffffffffffffffff610d5b826111a9565b51511615610ae6565b506001825114610ae0565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f696e76616c6964207369676e617475726520666f7220766f75636865720000006044820152fd5b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601160248201527f496e76616c6964207369676e61747572650000000000000000000000000000006044820152fd5b6040513d6000823e3d90fd5b825173ffffffffffffffffffffffffffffffffffffffff16875260209687019690920191600101610957565b6020808093610e71866102cd565b8152019301929150610805565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601c60248201527f726564656d7074696f6e206e6f74207369676e656420627920426f62000000006044820152fd5b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602060248201527f6261642063616e646964617465207475726e4e756d3b207c70726f6f667c3d316044820152fd5b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f706f737466756e642021756e616e696d6f75733b207c70726f6f667c3d3100006044820152fd5b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f6261642070726f6f665b305d2e7475726e4e756d3b207c70726f6f667c3d31006044820152fd5b506020925060ff61101661100c848601356111b6565b92858101906100ea565b929050160361114b5765ffffffffffff8061103660406106fb8580610143565b16156111465760018161104e60406106fb8680610143565b16146111465760039061106660406106fb8580610143565b16146110c957606482604051907f08c379a000000000000000000000000000000000000000000000000000000000825280600483015260248201527f6261642063616e646964617465207475726e4e756d3b207c70726f6f667c3d306044820152fd5b6110d581606092610143565b013580159081150361013e576110e85750565b606490604051907f08c379a00000000000000000000000000000000000000000000000000000000082526004820152601e60248201527f2166696e616c3b207475726e4e756d3d33202626207c70726f6f667c3d3000006044820152fd5b505050565b606482604051907f08c379a00000000000000000000000000000000000000000000000000000000082526004820152601560248201527f21756e616e696d6f75733b207c70726f6f667c3d3000000000000000000000006044820152fd5b8051156101c25760200190565b806000915b6111c3575090565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff810190808211610c2957169060ff809116908114610c295760010190806111bb56fea2646970667358221220e6d040b3da8bf5be31225a092c350df8c0992af202b0546f0b5a2cafeee4a65064736f6c63430008110033",
"deployedBytecode": "0x60c0604052600436101561001257600080fd5b6000803560e01c63438b01721461002857600080fd5b346100e7577ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc6060813601126100e35760043567ffffffffffffffff918282116100df5760a08183360301126100df57602435918383116100d757366023840112156100d7578260040135918483116100db573660248460051b860101116100db576044359485116100db5760409085360301126100d75760246100d494600401930190600401610569565b80f35b8480fd5b8580fd5b8380fd5b5080fd5b80fd5b9035907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe18136030182121561013e570180359067ffffffffffffffff821161013e57602001918160051b3603831361013e57565b600080fd5b9035907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff818136030182121561013e570190565b3565ffffffffffff8116810361013e5790565b90156101c2578035907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc18136030182121561013e570190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6080810190811067ffffffffffffffff82111761020d57604052565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6040810190811067ffffffffffffffff82111761020d57604052565b6060810190811067ffffffffffffffff82111761020d57604052565b90601f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0910116810190811067ffffffffffffffff82111761020d57604052565b67ffffffffffffffff811161020d5760051b60200190565b359073ffffffffffffffffffffffffffffffffffffffff8216820361013e57565b92919267ffffffffffffffff821161020d576040519161033660207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f8401160184610274565b82948184528183011161013e578281602093846000960137010152565b9080601f8301121561013e5781602061036e933591016102ee565b90565b909291926080938452610383816102b5565b9060409061039382519384610274565b8295818452602060a0948186520192600592831b8601958251871161013e5780945b8786106103c6575050505050505050565b67ffffffffffffffff863581811161013e57830190606080838851031261013e5785519281840184811084821117610528578752610403816102cd565b84528a5181013583811161013e57885161041e918301610353565b8b51850152868101359083821161013e5701908751601f8301121561013e57813590610449826102b5565b9361045689519586610274565b8285528c519384808701948d1b820101948b51861161013e5781015b8581106104925750505050505084820152815286510194865101946103b5565b803583811161013e578201948c7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe087825103011261013e578f958c51906104d8826101f1565b875181013582528d81013588518301528681013560ff8116810361013e57828f0152808f013586811161013e578f916105179251918a51910101610353565b868201528152855101945101610472565b602460007f4e487b710000000000000000000000000000000000000000000000000000000081526041600452fd5b359065ffffffffffff8216820361013e57565b9092918015610ff657600181146105d85760646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f6261642070726f6f66206c656e677468000000000000000000000000000000006044820152fd5b6105e28185610189565b60208301906105f182856100ea565b91905060408136031261013e5760405161060a8161023c565b813567ffffffffffffffff811161013e5782019060808236031261013e5760405191610635836101f1565b803567ffffffffffffffff811161013e57810136601f8201121561013e57610664903690602081359101610371565b8352602081013567ffffffffffffffff811161013e576106879036908301610353565b6020840152606061069a60408301610556565b9160408501928352013592831515840361013e57602065ffffffffffff93826001966060849501528152019401358452511603610f98576106dd60ff91516111b6565b1603610f3a57600265ffffffffffff61070160406106fb8880610143565b01610176565b1603610edc57600180602086013560021c1603610e7e576107228480610143565b6020810135907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe18136030182121561013e570180359067ffffffffffffffff821161013e57602001813603811361013e5761077e9136916102ee565b9260a08136031261013e576040519160a0830183811067ffffffffffffffff82111761020d57604052813583523567ffffffffffffffff811161013e5736601f82840101121561013e57808201356107d5816102b5565b916107e36040519384610274565b81835260208301903660208460051b83880101011161013e5790602082860101915b60208460051b82880101018310610e6357505050506020830152604081013567ffffffffffffffff8116810361013e5761085891608091604085015261084d606082016102cd565b606085015201610556565b6080820152828051810103926080841261013e5760607fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe06040519561089c8761023c565b60208401518752011261013e57604051906060820182811067ffffffffffffffff82111761020d5760405260408101519060ff8216820361013e576080918352606081015160208401520151604082015260208401528051602082015167ffffffffffffffff60408401511673ffffffffffffffffffffffffffffffffffffffff60608501511665ffffffffffff608086015116916040519460c0860190602087015260a060408701528451809152602060e0870195019060005b818110610e37575050508460009460809482946109aa94606060209a01528684015260a0830152037fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08101835282610274565b8381519101208651604051908582019283526040820152604081526109ce81610258565b5190208387015190604051858101917f19457468657265756d205369676e6564204d6573736167653a0a3332000000008352603c820152603c8152610a1281610258565b5190209060ff8151169060408682015191015191604051938452868401526040830152606082015282805260015afa15610e2b5773ffffffffffffffffffffffffffffffffffffffff60005116908115610dcd57610a88602073ffffffffffffffffffffffffffffffffffffffff9201516111a9565b511603610d6f57610acc610ac2610ab9610ab3610aad610ab395610ad4975199610189565b80610143565b806100ea565b93909580610143565b9490923691610371565b923691610371565b90600181511480610d64575b80610d3c575b80610d14575b15610cb6576020610b096040610b01846111a9565b5101516111a9565b5101518311610c58576020610b336040610b0183610b2a83610b01896111a9565b510151946111a9565b51015190838203918211610c295703610bcb57610b516040916111a9565b5101518051600110156101c257604001516020015103610b6d57565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601a60248201527f426f62206e6f742061646a757374656420636f72726563746c790000000000006044820152fd5b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601c60248201527f416c696365206e6f742061646a757374656420636f72726563746c79000000006044820152fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600960248201527f756e646572666c6f7700000000000000000000000000000000000000000000006044820152fd5b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f6f6e6c79206e617469766520617373657420616c6c6f776564000000000000006044820152fd5b5073ffffffffffffffffffffffffffffffffffffffff610d33836111a9565b51511615610aec565b5073ffffffffffffffffffffffffffffffffffffffff610d5b826111a9565b51511615610ae6565b506001825114610ae0565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f696e76616c6964207369676e617475726520666f7220766f75636865720000006044820152fd5b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601160248201527f496e76616c6964207369676e61747572650000000000000000000000000000006044820152fd5b6040513d6000823e3d90fd5b825173ffffffffffffffffffffffffffffffffffffffff16875260209687019690920191600101610957565b6020808093610e71866102cd565b8152019301929150610805565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601c60248201527f726564656d7074696f6e206e6f74207369676e656420627920426f62000000006044820152fd5b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602060248201527f6261642063616e646964617465207475726e4e756d3b207c70726f6f667c3d316044820152fd5b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f706f737466756e642021756e616e696d6f75733b207c70726f6f667c3d3100006044820152fd5b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f6261642070726f6f665b305d2e7475726e4e756d3b207c70726f6f667c3d31006044820152fd5b506020925060ff61101661100c848601356111b6565b92858101906100ea565b929050160361114b5765ffffffffffff8061103660406106fb8580610143565b16156111465760018161104e60406106fb8680610143565b16146111465760039061106660406106fb8580610143565b16146110c957606482604051907f08c379a000000000000000000000000000000000000000000000000000000000825280600483015260248201527f6261642063616e646964617465207475726e4e756d3b207c70726f6f667c3d306044820152fd5b6110d581606092610143565b013580159081150361013e576110e85750565b606490604051907f08c379a00000000000000000000000000000000000000000000000000000000082526004820152601e60248201527f2166696e616c3b207475726e4e756d3d33202626207c70726f6f667c3d3000006044820152fd5b505050565b606482604051907f08c379a00000000000000000000000000000000000000000000000000000000082526004820152601560248201527f21756e616e696d6f75733b207c70726f6f667c3d3000000000000000000000006044820152fd5b8051156101c25760200190565b806000915b6111c3575090565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff810190808211610c2957169060ff809116908114610c295760010190806111bb56fea2646970667358221220e6d040b3da8bf5be31225a092c350df8c0992af202b0546f0b5a2cafeee4a65064736f6c63430008110033",
"bytecode": "0x60808060405234610016576111c5908161001c8239f35b600080fdfe60c0604052600436101561001257600080fd5b6000803560e01c63438b01721461002857600080fd5b346100e7577ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc6060813601126100e35760043567ffffffffffffffff918282116100df5760a08183360301126100df57602435918383116100d757366023840112156100d7578260040135918483116100db573660248460051b860101116100db576044359485116100db5760409085360301126100d75760246100d494600401930190600401610569565b80f35b8480fd5b8580fd5b8380fd5b5080fd5b80fd5b9035907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe18136030182121561013e570180359067ffffffffffffffff821161013e57602001918160051b3603831361013e57565b600080fd5b9035907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff818136030182121561013e570190565b3565ffffffffffff8116810361013e5790565b90156101c2578035907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc18136030182121561013e570190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6080810190811067ffffffffffffffff82111761020d57604052565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6040810190811067ffffffffffffffff82111761020d57604052565b6060810190811067ffffffffffffffff82111761020d57604052565b90601f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0910116810190811067ffffffffffffffff82111761020d57604052565b67ffffffffffffffff811161020d5760051b60200190565b359073ffffffffffffffffffffffffffffffffffffffff8216820361013e57565b92919267ffffffffffffffff821161020d576040519161033660207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f8401160184610274565b82948184528183011161013e578281602093846000960137010152565b9080601f8301121561013e5781602061036e933591016102ee565b90565b909291926080938452610383816102b5565b9060409061039382519384610274565b8295818452602060a0948186520192600592831b8601958251871161013e5780945b8786106103c6575050505050505050565b67ffffffffffffffff863581811161013e57830190606080838851031261013e5785519281840184811084821117610528578752610403816102cd565b84528a5181013583811161013e57885161041e918301610353565b8b51850152868101359083821161013e5701908751601f8301121561013e57813590610449826102b5565b9361045689519586610274565b8285528c519384808701948d1b820101948b51861161013e5781015b8581106104925750505050505084820152815286510194865101946103b5565b803583811161013e578201948c7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe087825103011261013e578f958c51906104d8826101f1565b875181013582528d81013588518301528681013560ff8116810361013e57828f0152808f013586811161013e578f916105179251918a51910101610353565b868201528152855101945101610472565b602460007f4e487b710000000000000000000000000000000000000000000000000000000081526041600452fd5b359065ffffffffffff8216820361013e57565b9092918015610f7f57600181146105d85760646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f6261642070726f6f66206c656e677468000000000000000000000000000000006044820152fd5b6105e28185610189565b60208301906105f182856100ea565b91905060408136031261013e5760405161060a8161023c565b813567ffffffffffffffff811161013e5782019060808236031261013e5760405191610635836101f1565b803567ffffffffffffffff811161013e57810136601f8201121561013e57610664903690602081359101610371565b8352602081013567ffffffffffffffff811161013e576106879036908301610353565b6020840152606061069a60408301610556565b9160408501928352013592831515840361013e57602065ffffffffffff93826001966060849501528152019401358452511603610f21576106dd60ff915161113f565b1603610ec357600265ffffffffffff61070160406106fb8880610143565b01610176565b1603610e6557600180602086013560021c1603610e07576107228480610143565b6020810135907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe18136030182121561013e570180359067ffffffffffffffff821161013e57602001813603811361013e5761077e9136916102ee565b9260a08136031261013e576040519160a0830183811067ffffffffffffffff82111761020d57604052813583523567ffffffffffffffff811161013e5736601f82840101121561013e57808201356107d5816102b5565b916107e36040519384610274565b81835260208301903660208460051b83880101011161013e5790602082860101915b60208460051b82880101018310610dec57505050506020830152604081013567ffffffffffffffff8116810361013e5761085891608091604085015261084d606082016102cd565b606085015201610556565b6080820152828051810103926080841261013e5760607fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe06040519561089c8761023c565b60208401518752011261013e57604051906060820182811067ffffffffffffffff82111761020d5760405260408101519060ff8216820361013e576080918352606081015160208401520151604082015260208401528051602082015167ffffffffffffffff60408401511673ffffffffffffffffffffffffffffffffffffffff60608501511665ffffffffffff608086015116916040519460c0860190602087015260a060408701528451809152602060e0870195019060005b818110610dc0575050508460009460809482946109aa94606060209a01528684015260a0830152037fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08101835282610274565b8381519101208651604051908582019283526040820152604081526109ce81610258565b5190208387015190604051858101917f19457468657265756d205369676e6564204d6573736167653a0a3332000000008352603c820152603c8152610a1281610258565b5190209060ff8151169060408682015191015191604051938452868401526040830152606082015282805260015afa15610db45773ffffffffffffffffffffffffffffffffffffffff60005116908115610d5657610a88602073ffffffffffffffffffffffffffffffffffffffff920151611132565b511603610cf857610acc610ac2610ab9610ab3610aad610ab395610ad4975199610189565b80610143565b806100ea565b93909580610143565b9490923691610371565b923691610371565b90600181511480610ced575b80610cc5575b80610c9d575b15610c3f576020610b1a6040610b0983610b1183610b0989611132565b510151611132565b51015194611132565b51015190838203918211610c105703610bb257610b38604091611132565b5101518051600110156101c257604001516020015103610b5457565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601a60248201527f426f62206e6f742061646a757374656420636f72726563746c790000000000006044820152fd5b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601c60248201527f416c696365206e6f742061646a757374656420636f72726563746c79000000006044820152fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f6f6e6c79206e617469766520617373657420616c6c6f776564000000000000006044820152fd5b5073ffffffffffffffffffffffffffffffffffffffff610cbc83611132565b51511615610aec565b5073ffffffffffffffffffffffffffffffffffffffff610ce482611132565b51511615610ae6565b506001825114610ae0565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f696e76616c6964207369676e617475726520666f7220766f75636865720000006044820152fd5b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601160248201527f496e76616c6964207369676e61747572650000000000000000000000000000006044820152fd5b6040513d6000823e3d90fd5b825173ffffffffffffffffffffffffffffffffffffffff16875260209687019690920191600101610957565b6020808093610dfa866102cd565b8152019301929150610805565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601c60248201527f726564656d7074696f6e206e6f74207369676e656420627920426f62000000006044820152fd5b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602060248201527f6261642063616e646964617465207475726e4e756d3b207c70726f6f667c3d316044820152fd5b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f706f737466756e642021756e616e696d6f75733b207c70726f6f667c3d3100006044820152fd5b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f6261642070726f6f665b305d2e7475726e4e756d3b207c70726f6f667c3d31006044820152fd5b506020925060ff610f9f610f958486013561113f565b92858101906100ea565b92905016036110d45765ffffffffffff80610fbf60406106fb8580610143565b16156110cf57600181610fd760406106fb8680610143565b16146110cf57600390610fef60406106fb8580610143565b161461105257606482604051907f08c379a000000000000000000000000000000000000000000000000000000000825280600483015260248201527f6261642063616e646964617465207475726e4e756d3b207c70726f6f667c3d306044820152fd5b61105e81606092610143565b013580159081150361013e576110715750565b606490604051907f08c379a00000000000000000000000000000000000000000000000000000000082526004820152601e60248201527f2166696e616c3b207475726e4e756d3d33202626207c70726f6f667c3d3000006044820152fd5b505050565b606482604051907f08c379a00000000000000000000000000000000000000000000000000000000082526004820152601560248201527f21756e616e696d6f75733b207c70726f6f667c3d3000000000000000000000006044820152fd5b8051156101c25760200190565b806000915b61114c575090565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff810190808211610c1057169060ff809116908114610c1057600101908061114456fea264697066735822122087751c94f33a086e0a2cd5cf3308e270af7ea0770eb93b1aa4ce64398eb9fd4364736f6c63430008110033",
"deployedBytecode": "0x60c0604052600436101561001257600080fd5b6000803560e01c63438b01721461002857600080fd5b346100e7577ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc6060813601126100e35760043567ffffffffffffffff918282116100df5760a08183360301126100df57602435918383116100d757366023840112156100d7578260040135918483116100db573660248460051b860101116100db576044359485116100db5760409085360301126100d75760246100d494600401930190600401610569565b80f35b8480fd5b8580fd5b8380fd5b5080fd5b80fd5b9035907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe18136030182121561013e570180359067ffffffffffffffff821161013e57602001918160051b3603831361013e57565b600080fd5b9035907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff818136030182121561013e570190565b3565ffffffffffff8116810361013e5790565b90156101c2578035907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc18136030182121561013e570190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6080810190811067ffffffffffffffff82111761020d57604052565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6040810190811067ffffffffffffffff82111761020d57604052565b6060810190811067ffffffffffffffff82111761020d57604052565b90601f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0910116810190811067ffffffffffffffff82111761020d57604052565b67ffffffffffffffff811161020d5760051b60200190565b359073ffffffffffffffffffffffffffffffffffffffff8216820361013e57565b92919267ffffffffffffffff821161020d576040519161033660207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f8401160184610274565b82948184528183011161013e578281602093846000960137010152565b9080601f8301121561013e5781602061036e933591016102ee565b90565b909291926080938452610383816102b5565b9060409061039382519384610274565b8295818452602060a0948186520192600592831b8601958251871161013e5780945b8786106103c6575050505050505050565b67ffffffffffffffff863581811161013e57830190606080838851031261013e5785519281840184811084821117610528578752610403816102cd565b84528a5181013583811161013e57885161041e918301610353565b8b51850152868101359083821161013e5701908751601f8301121561013e57813590610449826102b5565b9361045689519586610274565b8285528c519384808701948d1b820101948b51861161013e5781015b8581106104925750505050505084820152815286510194865101946103b5565b803583811161013e578201948c7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe087825103011261013e578f958c51906104d8826101f1565b875181013582528d81013588518301528681013560ff8116810361013e57828f0152808f013586811161013e578f916105179251918a51910101610353565b868201528152855101945101610472565b602460007f4e487b710000000000000000000000000000000000000000000000000000000081526041600452fd5b359065ffffffffffff8216820361013e57565b9092918015610f7f57600181146105d85760646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f6261642070726f6f66206c656e677468000000000000000000000000000000006044820152fd5b6105e28185610189565b60208301906105f182856100ea565b91905060408136031261013e5760405161060a8161023c565b813567ffffffffffffffff811161013e5782019060808236031261013e5760405191610635836101f1565b803567ffffffffffffffff811161013e57810136601f8201121561013e57610664903690602081359101610371565b8352602081013567ffffffffffffffff811161013e576106879036908301610353565b6020840152606061069a60408301610556565b9160408501928352013592831515840361013e57602065ffffffffffff93826001966060849501528152019401358452511603610f21576106dd60ff915161113f565b1603610ec357600265ffffffffffff61070160406106fb8880610143565b01610176565b1603610e6557600180602086013560021c1603610e07576107228480610143565b6020810135907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe18136030182121561013e570180359067ffffffffffffffff821161013e57602001813603811361013e5761077e9136916102ee565b9260a08136031261013e576040519160a0830183811067ffffffffffffffff82111761020d57604052813583523567ffffffffffffffff811161013e5736601f82840101121561013e57808201356107d5816102b5565b916107e36040519384610274565b81835260208301903660208460051b83880101011161013e5790602082860101915b60208460051b82880101018310610dec57505050506020830152604081013567ffffffffffffffff8116810361013e5761085891608091604085015261084d606082016102cd565b606085015201610556565b6080820152828051810103926080841261013e5760607fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe06040519561089c8761023c565b60208401518752011261013e57604051906060820182811067ffffffffffffffff82111761020d5760405260408101519060ff8216820361013e576080918352606081015160208401520151604082015260208401528051602082015167ffffffffffffffff60408401511673ffffffffffffffffffffffffffffffffffffffff60608501511665ffffffffffff608086015116916040519460c0860190602087015260a060408701528451809152602060e0870195019060005b818110610dc0575050508460009460809482946109aa94606060209a01528684015260a0830152037fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08101835282610274565b8381519101208651604051908582019283526040820152604081526109ce81610258565b5190208387015190604051858101917f19457468657265756d205369676e6564204d6573736167653a0a3332000000008352603c820152603c8152610a1281610258565b5190209060ff8151169060408682015191015191604051938452868401526040830152606082015282805260015afa15610db45773ffffffffffffffffffffffffffffffffffffffff60005116908115610d5657610a88602073ffffffffffffffffffffffffffffffffffffffff920151611132565b511603610cf857610acc610ac2610ab9610ab3610aad610ab395610ad4975199610189565b80610143565b806100ea565b93909580610143565b9490923691610371565b923691610371565b90600181511480610ced575b80610cc5575b80610c9d575b15610c3f576020610b1a6040610b0983610b1183610b0989611132565b510151611132565b51015194611132565b51015190838203918211610c105703610bb257610b38604091611132565b5101518051600110156101c257604001516020015103610b5457565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601a60248201527f426f62206e6f742061646a757374656420636f72726563746c790000000000006044820152fd5b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601c60248201527f416c696365206e6f742061646a757374656420636f72726563746c79000000006044820152fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f6f6e6c79206e617469766520617373657420616c6c6f776564000000000000006044820152fd5b5073ffffffffffffffffffffffffffffffffffffffff610cbc83611132565b51511615610aec565b5073ffffffffffffffffffffffffffffffffffffffff610ce482611132565b51511615610ae6565b506001825114610ae0565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f696e76616c6964207369676e617475726520666f7220766f75636865720000006044820152fd5b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601160248201527f496e76616c6964207369676e61747572650000000000000000000000000000006044820152fd5b6040513d6000823e3d90fd5b825173ffffffffffffffffffffffffffffffffffffffff16875260209687019690920191600101610957565b6020808093610dfa866102cd565b8152019301929150610805565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601c60248201527f726564656d7074696f6e206e6f74207369676e656420627920426f62000000006044820152fd5b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602060248201527f6261642063616e646964617465207475726e4e756d3b207c70726f6f667c3d316044820152fd5b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f706f737466756e642021756e616e696d6f75733b207c70726f6f667c3d3100006044820152fd5b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f6261642070726f6f665b305d2e7475726e4e756d3b207c70726f6f667c3d31006044820152fd5b506020925060ff610f9f610f958486013561113f565b92858101906100ea565b92905016036110d45765ffffffffffff80610fbf60406106fb8580610143565b16156110cf57600181610fd760406106fb8680610143565b16146110cf57600390610fef60406106fb8580610143565b161461105257606482604051907f08c379a000000000000000000000000000000000000000000000000000000000825280600483015260248201527f6261642063616e646964617465207475726e4e756d3b207c70726f6f667c3d306044820152fd5b61105e81606092610143565b013580159081150361013e576110715750565b606490604051907f08c379a00000000000000000000000000000000000000000000000000000000082526004820152601e60248201527f2166696e616c3b207475726e4e756d3d33202626207c70726f6f667c3d3000006044820152fd5b505050565b606482604051907f08c379a00000000000000000000000000000000000000000000000000000000082526004820152601560248201527f21756e616e696d6f75733b207c70726f6f667c3d3000000000000000000000006044820152fd5b8051156101c25760200190565b806000915b61114c575090565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff810190808211610c1057169060ff809116908114610c1057600101908061114456fea264697066735822122087751c94f33a086e0a2cd5cf3308e270af7ea0770eb93b1aa4ce64398eb9fd4364736f6c63430008110033",
"linkReferences": {},
"deployedLinkReferences": {}
}
import { Signature, ethers } from 'ethers';
import { State } from '../state';
export declare const ForceMoveContractInterface: ethers.utils.Interface;
interface CheckpointData {

@@ -5,0 +4,0 @@ challengeState?: State;

"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.concludeArgs = exports.createConcludeTransaction = exports.checkpointArgs = exports.createCheckpointTransaction = exports.createChallengeTransaction = exports.ForceMoveContractInterface = void 0;
const ethers_1 = require("ethers");
const ForceMove_json_1 = __importDefault(require("../../../artifacts/contracts/ForceMove.sol/ForceMove.json"));
exports.concludeArgs = exports.createConcludeTransaction = exports.checkpointArgs = exports.createCheckpointTransaction = exports.createChallengeTransaction = void 0;
const signatures_1 = require("../../signatures");
const state_1 = require("../state");
// https://github.com/ethers-io/ethers.js/issues/602#issuecomment-574671078
exports.ForceMoveContractInterface = new ethers_1.ethers.utils.Interface(ForceMove_json_1.default.abi);
const multi_asset_holder_1 = require("./multi-asset-holder");
function createChallengeTransaction(states, // in turnNum order [..,state-with-largestTurnNum]

@@ -36,3 +30,3 @@ signatures, // in participant order: [sig-from-p0, sig-from-p1, ...]

const challengerSignature = (0, signatures_1.signChallengeMessage)(signedStates, challengerPrivateKey);
const data = exports.ForceMoveContractInterface.encodeFunctionData('challenge', [
const data = multi_asset_holder_1.NitroAdjudicatorContractInterface.encodeFunctionData('challenge', [
fixedPart,

@@ -47,3 +41,3 @@ proof,

function createCheckpointTransaction({ states, signatures, whoSignedWhat, }) {
const data = exports.ForceMoveContractInterface.encodeFunctionData('checkpoint', checkpointArgs({ states, signatures, whoSignedWhat }));
const data = multi_asset_holder_1.NitroAdjudicatorContractInterface.encodeFunctionData('checkpoint', checkpointArgs({ states, signatures, whoSignedWhat }));
return { data };

@@ -61,3 +55,3 @@ }

function createConcludeTransaction(states, signatures, whoSignedWhat) {
const data = exports.ForceMoveContractInterface.encodeFunctionData('conclude', concludeArgs(states, signatures, whoSignedWhat));
const data = multi_asset_holder_1.NitroAdjudicatorContractInterface.encodeFunctionData('conclude', concludeArgs(states, signatures, whoSignedWhat));
return { data };

@@ -64,0 +58,0 @@ }

@@ -1,13 +0,296 @@

interface MinimalArtifact {
contractName: string;
abi: any;
bytecode: string;
deployedBytecode: string;
linkReferences: any;
deployedLinkReferences: any;
}
export declare const ContractArtifacts: {
NitroAdjudicatorArtifact: MinimalArtifact;
ConsensusAppArtifact: MinimalArtifact;
VirtualPaymentAppArtifact: MinimalArtifact;
NitroAdjudicatorArtifact: {
_format: string;
contractName: string;
sourceName: string;
abi: ({
anonymous: boolean;
inputs: ({
indexed: boolean;
internalType: string;
name: string;
type: string;
components?: undefined;
} | {
components: {
internalType: string;
name: string;
type: string;
}[];
indexed: boolean;
internalType: string;
name: string;
type: string;
} | {
components: {
components: ({
components: ({
internalType: string;
name: string;
type: string;
components?: undefined;
} | {
components: {
internalType: string;
name: string;
type: string;
}[];
internalType: string;
name: string;
type: string;
})[];
internalType: string;
name: string;
type: string;
} | {
internalType: string;
name: string;
type: string;
components?: undefined;
})[];
internalType: string;
name: string;
type: string;
}[];
indexed: boolean;
internalType: string;
name: string;
type: string;
})[];
name: string;
type: string;
outputs?: undefined;
stateMutability?: undefined;
} | {
inputs: ({
components: {
internalType: string;
name: string;
type: string;
}[];
internalType: string;
name: string;
type: string;
} | {
components: {
components: ({
components: ({
internalType: string;
name: string;
type: string;
components?: undefined;
} | {
components: {
internalType: string;
name: string;
type: string;
}[];
internalType: string;
name: string;
type: string;
})[];
internalType: string;
name: string;
type: string;
} | {
internalType: string;
name: string;
type: string;
components?: undefined;
})[];
internalType: string;
name: string;
type: string;
}[];
internalType: string;
name: string;
type: string;
})[];
name: string;
outputs: never[];
stateMutability: string;
type: string;
anonymous?: undefined;
} | {
inputs: ({
internalType: string;
name: string;
type: string;
components?: undefined;
} | {
components: {
internalType: string;
name: string;
type: string;
}[];
internalType: string;
name: string;
type: string;
})[];
name: string;
outputs: ({
components: {
internalType: string;
name: string;
type: string;
}[];
internalType: string;
name: string;
type: string;
} | {
internalType: string;
name: string;
type: string;
components?: undefined;
})[];
stateMutability: string;
type: string;
anonymous?: undefined;
} | {
inputs: ({
internalType: string;
name: string;
type: string;
components?: undefined;
} | {
components: ({
internalType: string;
name: string;
type: string;
components?: undefined;
} | {
components: {
internalType: string;
name: string;
type: string;
}[];
internalType: string;
name: string;
type: string;
})[];
internalType: string;
name: string;
type: string;
})[];
name: string;
outputs: never[];
stateMutability: string;
type: string;
anonymous?: undefined;
})[];
bytecode: string;
deployedBytecode: string;
linkReferences: {};
deployedLinkReferences: {};
};
ConsensusAppArtifact: {
_format: string;
contractName: string;
sourceName: string;
abi: {
inputs: {
components: ({
components: ({
components: ({
internalType: string;
name: string;
type: string;
components?: undefined;
} | {
components: {
internalType: string;
name: string;
type: string;
}[];
internalType: string;
name: string;
type: string;
})[];
internalType: string;
name: string;
type: string;
} | {
internalType: string;
name: string;
type: string;
components?: undefined;
})[];
internalType: string;
name: string;
type: string;
} | {
internalType: string;
name: string;
type: string;
components?: undefined;
})[];
internalType: string;
name: string;
type: string;
}[];
name: string;
outputs: never[];
stateMutability: string;
type: string;
}[];
bytecode: string;
deployedBytecode: string;
linkReferences: {};
deployedLinkReferences: {};
};
VirtualPaymentAppArtifact: {
_format: string;
contractName: string;
sourceName: string;
abi: {
inputs: {
components: ({
components: ({
components: ({
internalType: string;
name: string;
type: string;
components?: undefined;
} | {
components: {
internalType: string;
name: string;
type: string;
}[];
internalType: string;
name: string;
type: string;
})[];
internalType: string;
name: string;
type: string;
} | {
internalType: string;
name: string;
type: string;
components?: undefined;
})[];
internalType: string;
name: string;
type: string;
} | {
internalType: string;
name: string;
type: string;
components?: undefined;
})[];
internalType: string;
name: string;
type: string;
}[];
name: string;
outputs: never[];
stateMutability: string;
type: string;
}[];
bytecode: string;
deployedBytecode: string;
linkReferences: {};
deployedLinkReferences: {};
};
};

@@ -20,3 +303,3 @@ export { DepositedEvent, getDepositedEvent, convertBytes32ToAddress, convertAddressToBytes32, } from './contract/multi-asset-holder';

export { channelDataToStatus } from './contract/channel-storage';
export { State, VariablePart, getVariablePart, getFixedPart, hashState } from './contract/state';
export { State, VariablePart, RecoveredVariablePart, getVariablePart, getFixedPart, hashState, } from './contract/state';
export * from './signatures';

@@ -23,0 +306,0 @@ export * from './transactions';

@@ -21,20 +21,9 @@ "use strict";

exports.hashState = exports.getFixedPart = exports.getVariablePart = exports.channelDataToStatus = exports.hashOutcome = exports.decodeOutcome = exports.encodeOutcome = exports.createValidTransitionTransaction = exports.ForceMoveAppContractInterface = exports.validTransition = exports.isExternalDestination = exports.getChannelId = exports.getChallengeClearedEvent = exports.getChallengeRegisteredEvent = exports.convertAddressToBytes32 = exports.convertBytes32ToAddress = exports.getDepositedEvent = exports.ContractArtifacts = void 0;
const lodash_pick_1 = __importDefault(require("lodash.pick"));
const NitroAdjudicator_json_1 = __importDefault(require("../artifacts/contracts/NitroAdjudicator.sol/NitroAdjudicator.json"));
const ConsensusApp_json_1 = __importDefault(require("../artifacts/contracts/ConsensusApp.sol/ConsensusApp.json"));
const VirtualPaymentApp_json_1 = __importDefault(require("../artifacts/contracts/VirtualPaymentApp.sol/VirtualPaymentApp.json"));
// https://hardhat.org/guides/compile-contracts.html#artifacts
const fields = [
'contractName',
'abi',
'bytecode',
'deployedBytecode',
'linkReferences',
'deployedLinkReferences',
];
const minimize = (artifact) => (0, lodash_pick_1.default)(artifact, fields);
exports.ContractArtifacts = {
NitroAdjudicatorArtifact: minimize(NitroAdjudicator_json_1.default),
ConsensusAppArtifact: minimize(ConsensusApp_json_1.default),
VirtualPaymentAppArtifact: minimize(VirtualPaymentApp_json_1.default),
NitroAdjudicatorArtifact: NitroAdjudicator_json_1.default,
ConsensusAppArtifact: ConsensusApp_json_1.default,
VirtualPaymentAppArtifact: VirtualPaymentApp_json_1.default,
};

@@ -41,0 +30,0 @@ var multi_asset_holder_1 = require("./contract/multi-asset-holder");

{
"name": "@statechannels/nitro-protocol",
"version": "2.0.0-alpha.1",
"version": "2.0.0-alpha.2",
"author": "statechannels.org",

@@ -46,3 +46,2 @@ "bugs": "https://github.com/statechannels/go-nitro/issues",

"@types/lodash.isequal": "^4.5.5",
"@types/lodash.pick": "^4.4.6",
"@types/lodash.shuffle": "^4.2.6",

@@ -68,3 +67,2 @@ "@types/mocha": "^9.1.0",

"lodash.isequal": "^4.5.0",
"lodash.pick": "^4.4.0",
"lodash.shuffle": "^4.2.0",

@@ -71,0 +69,0 @@ "prettier": "^2.6.2",

<h1 align="center">
<div><img src="https://protocol.statechannels.org/img/favicon.ico"> </div>
<div><img src="https://statechannels.org/favicon.ico"> </div>
Nitro Protocol
</h1>
Smart contracts which implement nitro protocol for state channel networks on ethereum. Includes javascript and typescript support.
Smart contracts which implement nitro protocol for state channel networks on Ethereum and other EVM-compatible chains. Includes javascript and typescript support.
:new: There is an accompanying documentation [website](https://statechannels.github.io/go-nitro/).
:new: There is an accompanying documentation [website](https://docs.statechannels.org/).
A full description of nitro protocol and it's capabilities can be found in a [whitepaper](https://eprint.iacr.org/2019/219).
## Installation

@@ -50,3 +48,3 @@

```typescript
const {NitroAdjudicatorArtifact, TrivialAppArtifact, TokenArtifact} =
const {NitroAdjudicatorArtifact, ConsensusAppArtifact, VirtualPaymentAppArtifact} =
require('@statechannels/nitro-protocol').ContractArtifacts;

@@ -58,8 +56,14 @@ ```

```typescript
import {Channel} from '@statechannels/nitro-protocol';
import {State} from '@statechannels/nitro-protocol';
const channel: Channel = {
const state: State = {
chainId: '0x1',
channelNonce: 0,
participants: ['0xalice...', '0xbob...'],
appDefinition: '0xabc...',
challengeDuration: '0x258',
outcome: [],
appData: '0x',
turnNum: 0,
isFinal: false,
};

@@ -71,5 +75,5 @@ ```

```typescript
import {getChannelId} from '@statechannels/nitro-protocol';
import {getChannelId, getFixedPart} from '@statechannels/nitro-protocol';
const channelId = getChannelId(channel);
const channelId = getChannelId(getFixedPart(state));
```

@@ -85,17 +89,2 @@

## Documentation website (GitHub)
1. Run `yarn docgen` to auto-generate markdown files from compiled Solidity code (using our fork of [`solidoc`](https://github.com/statechannels/solidoc)). If you change the source code you will need to recompile the contracts and re-run `solidoc` using `yarn contract:compile && yarn docgen`.
2. Run `cd website`
3. Run `yarn install`
4. Run `yarn start`
See https://docusaurus.io/docs/en/installation for more information.
NB: you may run into difficulty running `docgen / solidoc` if you have the native solc compiler installed at the incorrect version number. You may refer to the circle `config.yml` at the monorepo root to check which version is being used as a part of our continuous integration.
To add a new version of the docs, follow the instructions at https://docusaurus.io/docs/en/tutorial-version. We try to keep the documentation version in sync with the @statechannels/nitro-protocol npm package.
## Deploying contracts
### For the goerli testnet:

@@ -102,0 +91,0 @@

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc