@aeternity/aepp-sdk
Version:
SDK for the æternity blockchain
148 lines (147 loc) • 4.87 kB
TypeScript
import SchemaTypes from '../SchemaTypes.js';
import { Encoded } from '../../../utils/encoder.js';
/**
* @category delegation signature
*/
export declare enum DelegationTag {
/**
* Delegation of all AENS names to a contract
*/
AensWildcard = 1,
/**
* Delegation of an AENS name to a contract
*/
AensName = 2,
/**
* Delegation of AENS preclaim to a contract
*/
AensPreclaim = 3,
/**
* Delegation of oracle operations to a contract
*/
Oracle = 4,
/**
* Delegation of oracle query to a contract
*/
OracleResponse = 5
}
/**
* @see {@link https://github.com/aeternity/protocol/blob/8a9d1d1206174627f6aaef86159dc9c643080653/contracts/fate.md#from-ceres-serialized-signature-data}
*/
export declare const schemas: readonly [{
readonly tag: {
serialize: (value: DelegationTag.AensWildcard) => Buffer;
deserialize: (value: Buffer) => DelegationTag.AensWildcard;
constValue: DelegationTag.AensWildcard;
constValueOptional: boolean;
};
readonly version: {
serialize: (value?: 1 | undefined) => Buffer;
deserialize: (value: Buffer) => 1;
constValue: 1;
constValueOptional: boolean;
};
readonly accountAddress: {
serialize: (value: `ak_${string}`) => Buffer;
deserialize: (value: Buffer) => `ak_${string}`;
};
readonly contractAddress: {
serialize: (value: `ct_${string}`) => Buffer;
deserialize: (value: Buffer) => `ct_${string}`;
};
}, {
readonly tag: {
serialize: (value: DelegationTag.AensName) => Buffer;
deserialize: (value: Buffer) => DelegationTag.AensName;
constValue: DelegationTag.AensName;
constValueOptional: boolean;
};
readonly version: {
serialize: (value?: 1 | undefined) => Buffer;
deserialize: (value: Buffer) => 1;
constValue: 1;
constValueOptional: boolean;
};
readonly accountAddress: {
serialize: (value: `ak_${string}`) => Buffer;
deserialize: (value: Buffer) => `ak_${string}`;
};
/**
* AENS name to manage by a contract
*/
readonly nameId: {
serialize(value: import("../constants.js").AensName | Encoded.Name): Buffer;
deserialize: (value: Buffer) => `nm_${string}`;
};
readonly contractAddress: {
serialize: (value: `ct_${string}`) => Buffer;
deserialize: (value: Buffer) => `ct_${string}`;
};
}, {
readonly tag: {
serialize: (value: DelegationTag.AensPreclaim) => Buffer;
deserialize: (value: Buffer) => DelegationTag.AensPreclaim;
constValue: DelegationTag.AensPreclaim;
constValueOptional: boolean;
};
readonly version: {
serialize: (value?: 1 | undefined) => Buffer;
deserialize: (value: Buffer) => 1;
constValue: 1;
constValueOptional: boolean;
};
readonly accountAddress: {
serialize: (value: `ak_${string}`) => Buffer;
deserialize: (value: Buffer) => `ak_${string}`;
};
readonly contractAddress: {
serialize: (value: `ct_${string}`) => Buffer;
deserialize: (value: Buffer) => `ct_${string}`;
};
}, {
readonly tag: {
serialize: (value: DelegationTag.Oracle) => Buffer;
deserialize: (value: Buffer) => DelegationTag.Oracle;
constValue: DelegationTag.Oracle;
constValueOptional: boolean;
};
readonly version: {
serialize: (value?: 1 | undefined) => Buffer;
deserialize: (value: Buffer) => 1;
constValue: 1;
constValueOptional: boolean;
};
readonly accountAddress: {
serialize: (value: `ak_${string}`) => Buffer;
deserialize: (value: Buffer) => `ak_${string}`;
};
readonly contractAddress: {
serialize: (value: `ct_${string}`) => Buffer;
deserialize: (value: Buffer) => `ct_${string}`;
};
}, {
readonly tag: {
serialize: (value: DelegationTag.OracleResponse) => Buffer;
deserialize: (value: Buffer) => DelegationTag.OracleResponse;
constValue: DelegationTag.OracleResponse;
constValueOptional: boolean;
};
readonly version: {
serialize: (value?: 1 | undefined) => Buffer;
deserialize: (value: Buffer) => 1;
constValue: 1;
constValueOptional: boolean;
};
readonly queryId: {
readonly serialize: (value: Encoded.OracleQueryId) => Buffer;
readonly deserialize: (value: Buffer) => Encoded.OracleQueryId;
};
readonly contractAddress: {
serialize: (value: `ct_${string}`) => Buffer;
deserialize: (value: Buffer) => `ct_${string}`;
};
}];
type Schemas = SchemaTypes<typeof schemas>;
export type DlgParams = Schemas['TxParams'];
export type DlgUnpacked = Schemas['TxUnpacked'];
export {};