Skip to content

Commit

Permalink
Bumping versions, adding global typescript guest runtime interfaces
Browse files Browse the repository at this point in the history
Signed-off-by: Shivansh Vij <shivanshvij@loopholelabs.io>
  • Loading branch information
ShivanshVij committed Sep 1, 2023
1 parent e45dcad commit aa26de2
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "scale_signature_interfaces"
version = "0.1.5"
version = "0.1.6"
edition = "2021"
description = "The Scale Signature Interfaces for generating host and guest signatures across multiple languages"
homepage = "https://scale.sh"
Expand Down
6 changes: 6 additions & 0 deletions index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,12 @@
limitations under the License.
*/

// TYPESCRIPT_NEXT_FUNCTION is the name of the next function in the typescript guest runtime
export const TYPESCRIPT_NEXT_FUNCTION: string = "scale_next";

// TYPESCRIPT_ADDRESS_OF is the name of the address_of function in the typescript guest runtime
export const TYPESCRIPT_ADDRESS_OF: string = "scale_address_of";

// New is a factory function for creating a new Signature
export type New<T extends Signature> = () => T;

Expand Down
6 changes: 6 additions & 0 deletions interfaces.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,12 @@

package interfaces

// TYPESCRIPT_NEXT_FUNCTION is the name of the next function in the typescript guest runtime
const TYPESCRIPT_NEXT_FUNCTION = "scale_next" //nolint:revive

// TYPESCRIPT_ADDRESS_OF is the name of the address_of function in the typescript guest runtime
const TYPESCRIPT_ADDRESS_OF = "scale_address_of" //nolint:revive

// New is a factory function for creating a new Signature
type New[T Signature] func() T

Expand Down
6 changes: 6 additions & 0 deletions lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,12 @@
limitations under the License.
*/

// TYPESCRIPT_NEXT_FUNCTION is the name of the next function in the typescript guest runtime
pub const TYPESCRIPT_NEXT_FUNCTION: &str = "scale_next";

// TYPESCRIPT_ADDRESS_OF is the name of the address_of function in the typescript guest runtime
pub const TYPESCRIPT_ADDRESS_OF: &str = "scale_address_of";

// New is a factory function for creating a new Signature
#[allow(type_alias_bounds)]
pub type New<T: Signature> = fn() -> T;
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@loopholelabs/scale-signature-interfaces",
"version": "0.1.5",
"version": "0.1.6",
"description": "The Scale Signature Interfaces for generating host and guest signatures across multiple languages",
"homepage": "https://scale.sh",
"repository": "https://github.com/loopholelabs/scale-signature-interfaces",
Expand Down
2 changes: 1 addition & 1 deletion version/current_version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v0.1.5
v0.1.6

0 comments on commit aa26de2

Please sign in to comment.