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

@oasislabs/service

Package Overview
Dependencies
Maintainers
5
Versions
37
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@oasislabs/service - npm Package Compare versions

Comparing version 1.0.0-rc.13 to 1.0.0-rc.14

.rpt2_cache/rpt2_d7ae9269bc2a4d43790d4a34aae59097aec27e9a/code/cache/3f2081387c67cf581a2d34ac0d54c6b2845ab8e0

1

dist/lib/src/deploy/header.d.ts

@@ -101,3 +101,4 @@ export declare type DeployHeaderOptions = {

parseFromCode: typeof parseFromCode;
deployCode: typeof DeployHeader.deployCode;
};
export {};

@@ -259,3 +259,4 @@ var __extends = (this && this.__extends) || (function () {

parseFromCode: parseFromCode,
deployCode: DeployHeader.deployCode,
};
//# sourceMappingURL=header.js.map

8

package.json
{
"name": "@oasislabs/service",
"version": "1.0.0-rc.13",
"version": "1.0.0-rc.14",
"description": "",

@@ -37,4 +37,4 @@ "keywords": [],

"dependencies": {
"@oasislabs/common": "^1.0.0-rc.8",
"@oasislabs/confidential": "^1.0.0-rc.8",
"@oasislabs/common": "^1.0.0-rc.9",
"@oasislabs/confidential": "^1.0.0-rc.9",
"@oasislabs/types": "^1.0.0-rc.2",

@@ -51,3 +51,3 @@ "@types/pako": "^1.0.1",

},
"gitHead": "b120377dc7628f89d6ed0591da3d1c687f78ea59"
"gitHead": "ab83dcc22930b3ea15e99ace1cf2adfa18609461"
}

@@ -296,2 +296,3 @@ import { bytes } from '@oasislabs/common';

parseFromCode,
deployCode: DeployHeader.deployCode,
};
import { bytes } from '@oasislabs/common';
import { DeployHeader, DeployHeaderWriter } from '../src/deploy/header';
import { makeExpectedBytecode } from './utils';

@@ -97,16 +97,1 @@ describe('DeployHeader', () => {

});
function makeExpectedBytecode(headerBody: any, bytecode: string): Uint8Array {
let body = DeployHeaderWriter.body(headerBody);
let version = DeployHeaderWriter.shortToBytes(DeployHeader.currentVersion());
let size = DeployHeaderWriter.shortToBytes(body.length);
return new Uint8Array(
Buffer.concat([
DeployHeader.prefix(),
version,
size,
body,
bytes.parseHex(bytecode),
])
);
}

@@ -16,2 +16,3 @@ import { PublicKey, PrivateKey } from '@oasislabs/confidential';

import { OasisCoder } from '../src/coder/oasis';
import { makeExpectedBytecode } from './utils';

@@ -136,2 +137,23 @@ setGateway(new EmptyOasisGateway());

});
it('Service.at should accept a hex string', async () => {
const address = '0x288e7e1cc60962f40d4d782950470e3705c5acf4';
const bin = bytes.toHex(
new Uint8Array(
require('fs').readFileSync('test/wasm/mantle-counter.wasm')
)
);
const gateway = {
getCode: () => {
return { code: makeExpectedBytecode({ confidential: false }, bin) };
},
};
// @ts-ignore
const s = await Service.at(address, {
gateway,
db: new DummyStorage(),
});
expect(bytes.parseHex(address)).toEqual(s._inner.address);
});
});

@@ -138,0 +160,0 @@

@@ -23,2 +23,3 @@ import * as EventEmitter from 'eventemitter3';

import { RpcRequest as FnRequest } from '../src/coder';
import { DeployHeader, DeployHeaderWriter } from '../src/deploy/header';

@@ -308,1 +309,19 @@ export class EmptyOasisGateway implements OasisGateway {

}
export function makeExpectedBytecode(
headerBody: any,
bytecode: string
): Uint8Array {
let body = DeployHeaderWriter.body(headerBody);
let version = DeployHeaderWriter.shortToBytes(DeployHeader.currentVersion());
let size = DeployHeaderWriter.shortToBytes(body.length);
return new Uint8Array(
Buffer.concat([
DeployHeader.prefix(),
version,
size,
body,
bytes.parseHex(bytecode),
])
);
}

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

Sorry, the diff of this file is not supported yet

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

Sorry, the diff of this file is not supported yet

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

Sorry, the diff of this file is not supported yet

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

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

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